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

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

»áÔ±µÇ½

ÕʺÅ

ÃÜÂë

»Ø´ð

¼ÇסÃÜÂë

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

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 Submit ¶ÔÏó


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

Submit ¶ÔÏó

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

¾ÙÀý: Form УÑé

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

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

Submit ¶ÔÏóÊôÐÔ

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

Submit ¶ÔÏó·½·¨

Method
·½·¨
Description
ÃèÊö
IE F N W3C
blur() Removes focus from the submit button
È¡Ïû¶Ôsubmit°´Å¥µÄ¾Û½¹
4 1   Yes
click() Simulates a mouse-click on the submit button
Ä£·ÂÊó±êµã»÷submit°´Å¥
4 1 2 Yes
focus() Sets focus on the submit button
ÉèÖÃsubmit°´Å¥µÄ¾Û½¹
3 1   Yes
select() Selects the submit button
Ñ¡ÖÐsubmit°´Å¥
4 1   No

Submit ¶ÔÏóʼþ

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

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

ÆÀÂÛ (0) All