HTML DOM Invoer Voorwerp Voorwerp
Invoer Voorwerp Voorwerp
Die Input Submit-objek verteenwoordig 'n HTML <input>-element met type="submit".
Toegang tot 'n invoervoorwerpvoorwerp
Jy kan toegang verkry tot 'n <input> element met type="submit" deur getElementById():
Voorbeeld
var x = document.getElementById("mySubmit");
Wenk: Jy kan ook toegang tot <input type="submit"> kry deur deur die elementversameling van 'n vorm te soek.
Skep 'n invoervoorwerpvoorwerp
Jy kan 'n <input> element met type="submit" skep deur die document.createElement() metode te gebruik:
Voorbeeld
var x = document.createElement("INPUT");
x.setAttribute("type", "submit");
Invoer Dien objek-eienskappe in
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 |
Standaard eiendomme en geleenthede
Die Input Submit-objek ondersteun ook die standaard eienskappe en gebeurtenisse .
Verwante bladsye
HTML-tutoriaal: HTML-vorms
HTML verwysing: HTML <input> tag
HTML-verwysing: HTML <invoer> tipe kenmerk