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