JavaScript Reference/Javascript Methods/setMilliseconds

Материал из Web эксперт
Перейти к: навигация, поиск

"setMilliseconds()" Example

   <source lang="javascript">
   

<html> <body> <button onclick="var myDate = new Date(); myDate.setMilliseconds(845); alert(myDate);">SETMILLISECONDS</button> </body> </html>


     </source>
   
  


"setMilliseconds()" is applied to

   <source lang="javascript">

+----------------+--------------------------------------------------------------+ | Applied_To |Date | +----------------+--------------------------------------------------------------+

     </source>
   
  


"setMilliseconds()" Syntax, Parameters and Note

   <source lang="javascript">

Note: Sets the milliseconds elapsed during the current second.

Syntax:

dateName.setMilliseconds(param1) Parameters:

   param1   Optional; the milliseconds. Value: 0 to 999.
   
     
     </source>