JavaScript Reference/Javascript Properties/dateTime
Версия от 21:30, 25 мая 2010; (обсуждение)
Содержание
"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>