Objeto de redefinição de entrada HTML DOM
Objeto de redefinição de entrada
O objeto Input Reset representa um elemento HTML <input> com type="reset".
Acessar um objeto de redefinição de entrada
Você pode acessar um elemento <input> com type="reset" usando getElementById():
Exemplo
var x = document.getElementById("myReset");
Dica: Você também pode acessar <input type="reset"> pesquisando na coleção de elementos de um formulário.
Criar um objeto de redefinição de entrada
Você pode criar um elemento <input> com type="reset" usando o método document.createElement():
Exemplo
var x = document.createElement("INPUT");
x.setAttribute("type", "reset");
Propriedades do objeto de redefinição de 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 |
Propriedades e eventos padrão
O objeto Input Reset também suporta as propriedades e eventos padrão .
Páginas relacionadas
Tutorial HTML: Formulários HTML
Referência HTML: tag HTML <input>
Referência HTML: atributo de tipo HTML <input>