ÍøÂçѧԺ

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

»áÔ±µÇ½

ÕʺÅ

ÃÜÂë

»Ø´ð

¼ÇסÃÜÂë

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

HTML DOM
DOM ½éÉÜ
HTML DOM ¾ÙÀý
DOM ²Î¿¼
DOM ÕªÒª
HTML DOM ʵÀý
DOM Anchor
DOM Applet
DOM Area
DOM Base ¶ÔÏó
DOM Basefont¶ÔÏó
DOM Body ¶ÔÏó
DOM Document ¶ÔÏ..
DOM ʼþ
DOM Form ¶ÔÏó
DOM Frame ¶ÔÏó
DOM Frameset ¶ÔÏ..
DOM History
DOM Iframe ¶ÔÏó
DOM Image ¶ÔÏó
HTML DOM Button¶..

DOM Input Submit ¶ÔÏó


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

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