set

英[set] 美[sɛt]

vt. Set; place, arrange; put in a certain situation; place tableware

vi. Setting off; setting off; condensation

n.Gathering; a set; a set; a TV set

adj. Fixed; located in...; stubborn; arranged The

third person singular: sets plural: sets present participle: setting past tense: set past participle: set

##million

英[ˈmɪljən] Beauty [ˈmɪljən]

n.Millions

adj.Millions; countless

Plural: millions

second

UK[ˈsekənd] US[ˈsekənd]

n.Second; instant; inferior goods; second portion of food

adj.Second; secondary; ranking second place; another

adv. second; secondly; second place : seconds Plural: seconds Present participle: seconding Past tense: seconded Past participle: seconded

setMilliseconds() syntax

Function: Used to set the millisecond field of the specified time.

Syntax: dateObject.setMilliseconds(millisec)

##Parameters: millisec Required. Used to set the dateObject millisecond field, this parameter is an integer between 0 ~ 999.

Returns: The millisecond representation of the adjusted date.

Note: If one of the above parameters is specified with a one-digit number, JavaScript will add one or two leading 0s to the result. This method is always used in conjunction with a Date object.

setMilliseconds() example

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

<script type="text/javascript">
//通过 setMilliseconds() 方法把当前时间的毫秒字段设置为 001
    var d = new Date()
    d.setMilliseconds(1)
    document.write(d)

</script>

</body>
</html>

Run instance »

Click the "Run instance" button to view the online instance