del dateTime Property
Example
Return the date and time of when some text was deleted:
var x = document.getElementById("myDel").dateTime;
The result of x could be:
2011-11-15T22:55:03Z
Try it yourself »
Definition and Usage
The dateTime property sets or returns the value of the datetime attribute of a deleted text.
The datetime attribute specifies the date and time when the text was deleted.
Note: The datetime attribute has no visual effect in ordinary web browsers, but can be used by screen readers.
Browser Support
The dateTime property is supported in all major browsers.
Syntax
Return the dateTime property:
delObject.dateTime
Set the dateTime property:
delObject.dateTime=YYYY-MM-DDThh:mm:ssTZD
Property Values
Value | Description |
---|---|
YYYY-MM-DDThh:mm:ssTZD | The date and time of when the text was deleted. Explanation of components:
|
Technical Details
Return Value: | A String, representing the date and time of when the text was deleted |
---|
More Examples
Example
Change the value of the datetime attribute:
document.getElementById("myDel").dateTime = "2013-11-15T21:40:07Z";
Try it yourself »
Related Pages
HTML reference: HTML <del> datetime attribute
del Object