Objeto de tiempo HTML DOM
Objeto de tiempo
El objeto Time representa un elemento HTML <time>.
Acceder a un objeto de tiempo
Puede acceder a un elemento <time> usando getElementById():
Ejemplo
var x = document.getElementById("myTime");
Crear un objeto de tiempo
Puedes crear un elemento <time> usando el método document.createElement():
Ejemplo
var x = document.createElement("TIME");
Propiedades del objeto de tiempo
Property | Description |
---|---|
dateTime | Sets or returns the value of the datetime attribute in a <time> element |
Propiedades y eventos estándar
El objeto Time también es compatible con las propiedades y los eventos estándar .
páginas relacionadas
Referencia HTML: etiqueta HTML <time>