English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
MethodMethod to set the milliseconds of the date object.
If the number you specify is outside the expected range (0 to999Then the date information in the Date object will be updated accordingly.
For example, if specified1005If so, the seconds will increase.1,并且5,并且
Syntax:
Example var d = new Date();42d.setMilliseconds( 0);39document.getElementById('result;).innerHTML = d.getMilliseconds();/Test and See‹
Browser Compatibility
All browsers fully support the setMilliseconds() method: | |||||
Method | setMilliseconds() | setMilliseconds() | setMilliseconds() | setMilliseconds() | setMilliseconds() |
Parameter Value | Parameter |
---|---|
Description | millisec9990 to between the numbers, representing milliseconds.999If the value provided is greater than |
Return Value: | 1970 Year1Month1Milliseconds between 00:00:00 UTC and the update date |
---|---|
JavaScript Version: | ECMAScript 1 |