ins dateTime property
Examples
Returns the date and time text is inserted:
var x = document.getElementById("myIns").dateTime;
x The output is:
2012-09-15T22:55:03Z
try it"
Definitions and use
dateTime property sets or returns to insert text datetime attribute values.
datetime attribute defines the date and time is inserted or modify the text.
Note: dateTime property has no visual effect in an ordinary web browser, but you can use screen readers.
Browser Support
All major browsers support dateTime attribute.
grammar
Back dateTime attributes:
insObject .dateTime
Setting dateTime attributes:
insObject .dateTime=YYYY-MM-DDThh:mm:ssTZD
Property Value
值 | 描述 |
---|---|
YYYY-MM-DDThh:mm:ssTZD |
日期或时间。下面解释了其中的成分:
|
Technical Description
return value: | String that represents a date and time to insert text |
---|
More examples
Examples
Modify datetime attribute values:
document.getElementById("myIns").dateTime="2013-11-15T21:40:07Z";
try it"
related articles
HTML Reference Manual: HTML <INS> datetime attribute