Objeto de envío de entrada HTML DOM
Objeto de envío de entrada
El objeto Input Submit representa un elemento HTML <input> con type="submit".
Acceder a un objeto de envío de entrada
Puede acceder a un elemento <input> con type="submit" usando getElementById():
Ejemplo
var x = document.getElementById("mySubmit");
Sugerencia: también puede acceder a <input type="submit"> buscando en la colección de elementos de un formulario.
Crear un objeto de envío de entrada
Puede crear un elemento <input> con type="submit" usando el método document.createElement():
Ejemplo
var x = document.createElement("INPUT");
x.setAttribute("type", "submit");
Propiedades de objeto de envío de entrada
Property | Description |
---|---|
autofocus | Sets or returns whether a submit button should automatically get focus when the page loads |
defaultValue | Sets or returns the default value of a submit button |
disabled | Sets or returns whether the submit button is disabled, or not |
form | Returns a reference to the form that contains the submit button |
formAction | Sets or returns the value of the formaction attribute of a submit button |
formEnctype | Sets or returns the value of the formenctype attribute of a submit button |
formMethod | Sets or returns the value of the formmethod attribute of a submit button |
formNoValidate | Sets or returns whether the form-data should be validated or not, on submission |
formTarget | Sets or returns the value of the formtarget attribute of a submit button |
name | Sets or returns the value of the name attribute of a submit button |
type | Returns which type of form element the submit button is |
value | Sets or returns the value of the value attribute of the submit button |
Propiedades y eventos estándar
El objeto Input Submit 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>