Easy Tutorial
❮ Jsref Prototype Boolean Jsref Gettimezoneoffset ❯

deldateTime Attribute

del Object

Example

Return the date and time the text was deleted:

x Output result:


Definition and Usage

The dateTime attribute is used to set or return the value of the datetime attribute of the deleted text.

The datetime attribute defines the date and time of the deleted text.

Note: The dateTime attribute has no visual effect in regular web browsers but can be used by screen readers.


Browser Support

All major browsers support the dateTime attribute.


Syntax

Return the dateTime attribute:

Set the dateTime attribute:

Attribute Values

Value Description
YYYY-MM-DDThh:mm:ssTZD Date or time. The components are explained below: YYYY - Year (e.g., 2011)<br> MM - Month (e.g., 01 for January)<br> DD - Day (e.g., 08)<br> T - Required separator if time is specified<br> hh - Hour (e.g., 22 for 10.00pm)<br> mm - Minute (e.g., 55)<br> ss - Second (e.g., 03)<br> TZD - Time zone identifier (Z stands for Zulu, also known as Greenwich Mean Time)

Technical Description

| Return Value: | String, representing the date and time of the deleted text | | --- | --- |


More Examples

Example

Modify the datetime attribute:

Related Pages

HTML Reference: HTML <del> datetime Attribute


del Object

❮ Jsref Prototype Boolean Jsref Gettimezoneoffset ❯