Input HTML DOM Reimposta oggetto
Ingresso Reset Oggetto
L'oggetto Input Reset rappresenta un elemento HTML <input> con type="reset".
Accedere a un oggetto di ripristino dell'ingresso
Puoi accedere a un elemento <input> con type="reset" usando getElementById():
Esempio
var x = document.getElementById("myReset");
Suggerimento: puoi anche accedere a <input type="reset"> cercando nella raccolta di elementi di un modulo.
Crea un oggetto di ripristino dell'ingresso
Puoi creare un elemento <input> con type="reset" usando il metodo document.createElement():
Esempio
var x = document.createElement("INPUT");
x.setAttribute("type", "reset");
Input Ripristina proprietà oggetto
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 |
Proprietà ed eventi standard
L'oggetto Input Reset supporta anche le proprietà e gli eventi standard .
Pagine correlate
Esercitazione HTML: Moduli HTML
Riferimento HTML: tag HTML <input>
Riferimento HTML: attributo tipo HTML <input>