HTML DOM- invoer Stel objek terug
Invoer Stel voorwerp in
Die Input Reset-objek verteenwoordig 'n HTML <input>-element met type="reset".
Toegang tot 'n Invoer-terugstelvoorwerp
Jy kan toegang tot 'n <input>-element kry met type="reset" deur getElementById():
Voorbeeld
var x = document.getElementById("myReset");
Wenk: Jy kan ook toegang tot <input type="reset"> kry deur deur die elementversameling van 'n vorm te soek.
Skep 'n Invoer-terugstel-objek
Jy kan 'n <input> element met type="reset" skep deur die document.createElement() metode te gebruik:
Voorbeeld
var x = document.createElement("INPUT");
x.setAttribute("type", "reset");
Invoer Stel voorwerpeienskappe terug
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 |
Standaard eiendomme en geleenthede
Die Input Reset-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