ins dateTime attribute
Definition and Usage
dateTime
Attribute sets or returns the value of the datetime attribute of the inserted text.
<ins> datetime attribute Specify the date and time of insertion/alteration of text.
Note:The datetime attribute has no visual effect in ordinary web browsers, but it can be used by screen readers.
See also:
HTML Reference Manual:HTML <ins> Tag
Instance
Example 1
Return the date and time of inserted text:
var x = document.getElementById("myIns").dateTime;
Example 2
Change the value of datetime attribute:
document.getElementById("myIns").dateTime = "2013-11-15T21:40:07Z";
Syntax
Return dateTime attribute:
insObject.dateTime
Set dateTime attribute:
insObject.dateTime = YYYY-MM-DDThh:mm:ssTZD
Attribute Value
Value | Description |
---|---|
YYYY-MM-DDThh:mm:ssTZD |
Specify the date and time of insertion/alteration of text. Component Description:
|
Technical Details
Return Value: | A string value representing the date and time of the inserted text. |
---|
Browser Support
Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|
Chrome | Edge | Firefox | Safari | Opera |
Support | Support | Support | Support | Support |
Related Pages
HTML Reference Manual:HTML <ins> datetime Attribute