Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

del dateTime property

del dateTime property

del Object Reference del Object

Example

Returns the date and time when the text was deleted:

var x = document.getElementById("myDel").dateTime;

x The output result is:

2011-11-15T22:55:03Z

Try it »


Definition and usage

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

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

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


Browser support

Internet Explorer Firefox Opera Google Chrome Safari

All major browsers support the dateTime property.


Syntax

Return the dateTime property:

delObject

.dateTime

Set the dateTime property:

delObject

.dateTime=

YYYY-MM-DDThh:mm:ssTZD

Attribute values

Value Description
YYYY-MM-DDThh:mm:ssTZD

Date or time. The components are explained below:

  • YYYY - Year (e.g. 2011)
  • MM - Month (e.g. 01 for January)
  • DD - Day (e.g. 08)
  • T - Required separator if the time is specified
  • hh - Hour (e.g. 22 for 10.00pm)
  • mm - Minute (e.g. 55)
  • ss - Second (e.g. 03)
  • TZD - Time zone designator (Z stands for Zulu, also known as Greenwich Mean Time)
  • |

    Technical description

    Return value: String representing the date and time of a deleted text

    More examples

    Example

    Modify the datetime property:

    document.getElementById("myDel").dateTime="2013-11-15T21:40:07Z";

    Try it »

    Related pages

    HTML Reference Manual: HTML datetime property


    del Object Reference del Object