Objeto de reinicio de entrada HTML DOM
Objeto de reinicio de entrada
El objeto Input Reset representa un elemento HTML <input> con type="reset".
Acceder a un objeto de reinicio de entrada
Puede acceder a un elemento <input> con type="reset" usando getElementById():
Ejemplo
var x = document.getElementById("myReset");
Sugerencia: también puede acceder a <input type="reset"> buscando en la colección de elementos de un formulario.
Crear un objeto de reinicio de entrada
Puede crear un elemento <input> con type="reset" utilizando el método document.createElement():
Ejemplo
var x = document.createElement("INPUT");
x.setAttribute("type", "reset");
Propiedades del objeto Restablecer entrada
Property | Description |
---|---|
autofocus | Sets or returns whether a reset button should automatically get focus when the page loads |
defaultValue | Sets or returns the default value of a reset button |
disabled | Sets or returns whether the reset button is disabled, or not |
form | Returns a reference to the form that contains the reset button |
name | Sets or returns the value of the name attribute of a reset button |
type | Returns which type of form element the reset button is |
value | Sets or returns the value of the value attribute of the reset button |
Propiedades y eventos estándar
El objeto Input Reset también es compatible con las propiedades y los eventos estándar .
páginas relacionadas
Tutorial de HTML: formularios HTML
Referencia HTML: etiqueta HTML <input>
Referencia HTML: atributo de tipo HTML <entrada>