DATETIME Attribute | dateTime Property
| DHTML文档教程 |
Sets or retrieves the date and time of a modification to the object.
dhtml语法
HTML | <ELEMENT DATETIME
= sDatetime... >
|
---|
Scripting | object.dateTime(v) [ = sDatetime ] |
---|
DHTML可能的值
sDatetime | String that
specifies or receives the date and time a modification. |
The property is read/write.
The property has no default value.
Expressions can be used in place of the preceding value(s), as of Microsoft® Internet Explorer 5. For more information, see about dynamic properties.
Remarks
The following is the standard format for defining the time and date as defined in HTML 4.0 (and taken from the ISO reference 8601:1988).
Standard Date-Time Format |
---|
YYYY-MM-DDThh:mm:ssTZD |
The following table shows the datetime syntax.
Syntax | Definition |
---|
YYYY | Four-digit year |
MM | Two-digit month (01=January, etc.) |
DD | Two-digit day of month (01 through 31) |
hh | Two digit hour (00 through 23) (A.M./P.M. NOT allowed) |
mm | Two digit minute (00 through 59) |
ss | Two digit second (00 through 59) |
TZD | Time zone designator |
The following table shows values for the Time Zone Designator(TZD) above.
TZD syntax | Definition |
---|
Z | (Must be uppercase) Specifies coordinated universal time (UTC) |
+hh:mm | Specified time is hh hours and mm minutes ahead of UTC. |
-hh:mm | Specified time is is hh hours and mm minutes behind UTC. |
If a generating application does not know the time to the second, it may use the value "00" for the seconds (and minutes and hours if necessary).
The standard specifies an uppercase "T" to indicate the beginning of the time element.
Note This standard does not address the issue of leap seconds.
There is no functionality implemented for this property unless defined by the author.
是否符合公共标准
This property is defined in
HTML 4.0 and
is defined in
World Wide Web Consortium (W3C) Document Object Model (DOM) Level 1 .
Applies To