ins dateTime Property
Example
Return the date and time of when some text was inserted:
var x = document.getElementById("myIns").dateTime;
Try it Yourself »
Description
The dateTime property sets or returns the value of the datetime attribute of an inserted text.
The datetime attribute specifies the date and time of when the text was inserted/changed.
Note: The datetime attribute has no visual effect in ordinary web browsers, but can be used by screen readers.
Browser Support
Property | |||||
---|---|---|---|---|---|
dateTime | Yes | Yes | Yes | Yes | Yes |
Syntax
Return the dateTime property:
insObject.dateTime
Set the dateTime property:
insObject.dateTime = YYYY
-MM-DDThh:mm:ssTZD
Property Values
Value | Description |
---|---|
YYYY-MM-DDThh:mm:ssTZD | Specifies the date and time of when the text was inserted/changed. Explanation of components:
|
Technical Details
Return Value: | A String, representing the date and time of when the text was inserted |
---|
More Examples
Example
Change the value of the datetime attribute:
document.getElementById("myIns").dateTime = "2013-11-15T21:40:07Z";
Try it Yourself »
Related Pages
HTML reference: HTML <ins> datetime attribute
❮ ins Object
Copyright 1999-2023 by Refsnes Data. All Rights Reserved.