ÍøÂçѧԺ w3popÉçÇø ÍøÂç×ÊÔ´ ITÐÂÎÅ

w3pop.com :: ÍøÂçѧԺ :: HTML DOM :: DOM Input Reset ¶ÔÏó

»áÔ±µÇ½

ÕʺÅ

ÃÜÂë

»Ø´ð

¼ÇסÃÜÂë

Íü¼ÇÃÜÂë? ×¢²á

HTML DOM
DOM Input Checkb..
DOM Input File ¶..
DOM Input Hidden..
DOM Input Passwo..
DOM Input Radio ..
DOM Input Reset ..
DOM Input Submit..
DOM Input Text ¶..
DOM Link ¶ÔÏó
DOM Location ¶ÔÏ..
DOM Meta ¶ÔÏó
DOM Navigator ¶Ô..
DOM ¶ÔÏó
DOM Option ¶ÔÏó
DOM Screen ¶ÔÏó
DOM Select ¶ÔÏó
DOM Style ¶ÔÏó
DOM Table ¶ÔÏó
DOM TableData ¶Ô..
DOM TableHeader ..

DOM Input Reset ¶ÔÏó


×÷Õß:w3pop.com ·­Òë/ÕûÀí:w3pop.com ·¢²¼:2007-04-28 ä¯ÀÀ:4116 :: ::

Reset ¶ÔÏó

The Reset object represents a reset button in an HTML form. For each instance of an <input type="reset"> tag in an HTML form, a Reset object is created.
Reset¶ÔÏó´ú±íÁËHTML±íµ¥ÖÐReset°´Å¥£¬Ã¿µ±HTML±íµ¥ÖгöÏÖ<input type="reset"> ±êÇ©¾ÍÒâζ×ÅReset±»½¨Á¢ÆðÀ´ÁË

You can access a Reset object by indexing the elements array (by number or name) of the corresponding form or by using getElementById().
Äã¿ÉÒÔ´Ó±íµ¥ÔªÊý×éµÄÊý×Ö»òÊÇÃû³ÆÀ´·ÃÎÊReset ¶ÔÏ󣬻òÊÇʹÓÃgetELmentById()À´·ÃÎÊËü

IE: Internet Explorer, F: Firefox, N: Netscape, W3C: World Wide Web Consortium (Internet Standard).

Reset ¶ÔÏóÊôÐÔ

Property
ÊôÐÔ
Description
ÃèÊö
IE  F N W3C
accept Sets or returns a list of content types, which the server processing this form will handle correctly
ÉèÖûò·µ»ØÄÚÈݵÄÀàÐÍ£¬È÷þÎñÆ÷¸ü׼ȷµÄ´¦ÀíÕâ¸ö±íµ¥
-     Yes
accesskey Sets or returns the keyboard key to access the reset button
ÉèÖûò·µ»ØÄܹ»·ÃÎÊÕâReset°´Å¥µÄ¼üÅ̰´¼ü¡£
4     Yes
align Sets or returns the alignment of the reset button according to the surrounding text
ÉèÖûò·µ»ØReset°´Å¥Ïà¶ÔÖÜΧÎÄ×ÖµÄ¶ÔÆë·½Ê½
-     Yes
alt Sets or returns an alternate text to display if the browser does not support reset buttons
ÉèÖûò·µ»Ø¶ÔÓÚÄÇЩÎÞ·¨Ö§³ÖReset°´Å¥ä¯ÀÀÆ÷µÄÌæ»»ÎÄ×Ö¡£
-     Yes
defaultValue Sets or returns the default value of the reset button
ÉèÖûò·µ»ØReset°´Å¥µÄĬÈÏÖµ
3     Yes
disabled Sets or returns whether or not the reset button should be disabled
ÉèÖûò·µ»ØReset°´Å¥ÊÇ·ñÓ¦¸Ã½ûÓá£
5 1   Yes
form Returns a reference to the reset button's parent form
·µ»Ø°üº¬Reset°´Å¥±íµ¥µÄ²Î¿¼
3 1 2 Yes
id Sets or returns the id of the reset button (In IE 4 this property is read-only)
ÉèÖûò·µ»ØReset°´Å¥µÄid(ÔÚIE4ÖÐÕâ¸öÊôÐÔÖ»¶Á)
4 1   No
name Sets or returns the name of the reset button
ÉèÖûò·µ»ØReset°´Å¥µÄname
3 1 2 Yes
size Sets or returns the size of the reset button 3     Yes
tabIndex Sets or returns the tab order for the reset button
ÉèÖûò·µ»ØReset°´Å¥ÓÉtab˳ÐòËù¶¨ÒåµÄË÷Òý
4     Yes
type Returns the type of the form element. For a reset object it will always be "reset"
·µ»Ø±íµ¥ÔªËØÀàÐÍ£¬ÊÇReset°´Å¥µÄ»°¾Í»á·µ»ØÎª"reset"
3 1 3 Yes
value Sets or returns the value of the value attribute of the reset button
ÉèÖûò·µ»ØReset°´Å¥valueÊôÐÔµÄÖµ
3 1 2 Yes

Reset ¶ÔÏó·½·¨

Method
·½·¨
Description
ÃèÊö
IE F N W3C
blur() Removes focus from the reset button 4 1 2 Yes
click() Simulates a mouse-click on the reset button 4 1   Yes
focus() Sets focus on the reset button 3 1 2 Yes
select() Selects the reset button 4 1 2 No

Reset ¶ÔÏóʼþ

Syntax: object.event_name="someJavaScriptCode"
Óï·¨£º¶ÔÏó.ʼþÃû³Æ="һЩJS´úÂë"

Event
ʼþ
Description
ÃèÊö
IE F N W3C
onBlur Executes some code when the reset button loses focus
µ±Reset°´Å¥Ê§È¥¾Û½¹µÄʱºòÖ´ÐÐһЩ´úÂë
4 1 2  
onClick Executes some code when the user clicks on the reset button
µ±Reset°´Å¥±»µã»÷µÄʱºòÖ´ÐÐһЩ´úÂë
4      
onFocus Executes some code when the reset button gets focus
µ±Reset°´Å¥µÃµ½¾Û½¹µÄʱºòÖ´ÐÐһЩ´úÂë
3 1 2  
onSelectStart Executes some code when the reset button is selected
µ±Reset°´Å¥±»Ñ¡ÖеÄʱºòÖ´ÐÐһЩ´úÂë
4      

ÆÀÂÛ (0) All