JavaScript Reference/Javascript Properties/dateTime

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

"dateTime" Example

   <source lang="javascript">
   

<html> <body> <script language="JavaScript"> function function1() {

   document.all.myDel.dateTime = "2013-06-15T14:50:30Z";
   alert(document.all.myDel.dateTime); 

} </script> This text has been deleted. <input type="button"

      onClick="function1();" 
      value="Display date and time of the above text deletion">

</body> </html>


     </source>
   
  


"dateTime" is applied to

   <source lang="javascript">

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

     </source>
   
  


"dateTime" Possible Values

   <source lang="javascript">

Possible Values YYYY-MM-DDThh:mm:ssTZD standard time format YYYY-MM-DDZ hh:mm:ssTZD UTC time format


     </source>
   
  


"dateTime" Syntax and Note

   <source lang="javascript">

Note: Read and write property. Sets a new date and time.

Syntax:

document.getElementById("elementID").dateTime = value document.all.elementID.dateTime = value // IE only


     </source>