JavaScript Reference/Javascript Methods/setTime — различия между версиями

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

Текущая версия на 11:22, 26 мая 2010

"setTime()" Example

   <source lang="javascript">
   

<html> <body> <button onclick="var myDate = new Date(); myDate.setTime(myDate.getTime()); alert(myDate);">SETTIME</button> </body> </html>


     </source>
   
  


"setTime()" is applied to

   <source lang="javascript">

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

     </source>
   
  


"setTime()" Syntax, Parameters and Note

   <source lang="javascript">

Note: Sets the time by supplying milliseconds elapsed since January 1, 1970.

Syntax:

dateName.setTime(param1) Parameters:

   param1   Required; the number of milliseconds.
   
     
     </source>