please dont rip this site

JavaScript: The Definitive Guide

Previous Chapter 21
JavaScript Reference
Next
 

Element.click() Method

Name

Element.click() Method---simulate a mouse click on a form element

Availability

Navigator 2.0, Internet Explorer 3.0

Synopsis

element.click()

Arguments

none

Returns

nothing

Description

The click() method of a form element simulates a mouse click on the form element, but does not invoke the onclick() event handler of the element.

The click() method is not often useful. Because it does not invoke the onClick() event handler, it is not useful to call this method on Button elements--they don't have any behavior other than that defined by the onClick() handler. Calling click() on a Submit or Reset element will submit or reset a form, but this can be more directly achieved with the submit() and reset() method of the Form object itself.

You can call click() on Radio and Checkbox elements to check or uncheck those buttons, but it is generally easier to simply set the checked property of those elements. Furthermore, click() does not work for these elements in Navigator 2.0 or 3.0 on Unix platforms.

On Windows (but not Unix) platforms, you can even call click() for Select elements, but doing so does not accomplish much. For Select objects implemented as drop-down menus, for example click() will cause the menu to drop down, but does not actually select an item from the menu. It is poor user-interface design to do this sort of thing--the user should always be in control of the form elements.

Finally, the click() method is not defined for the text input form elements: Text, Textarea, Password and FileUpload.

See Also

"Element"


Previous Home Next
Element.checked Book Index Element.defaultChecked

HTML: The Definitive Guide CGI Programming JavaScript: The Definitive Guide Programming Perl WebMaster in a Nutshell

file: /Techref/language/java/script/definitive/refp_100.htm, 5KB, , updated: 2019/10/14 15:00, local time: 2024/11/13 23:27,
TOP NEW HELP FIND: 
3.135.190.135:LOG IN

 ©2024 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions?
Please DO link to this page! Digg it! / MAKE!

<A HREF="http://techref.massmind.org/Techref/language/java/script/definitive/refp_100.htm"> [Chapter 21] Reference: Element.click()</A>

After you find an appropriate page, you are invited to your to this massmind site! (posts will be visible only to you before review) Just type a nice message (short messages are blocked as spam) in the box and press the Post button. (HTML welcomed, but not the <A tag: Instead, use the link box to link to another page. A tutorial is available Members can login to post directly, become page editors, and be credited for their posts.


Link? Put it here: 
if you want a response, please enter your email address: 
Attn spammers: All posts are reviewed before being made visible to anyone other than the poster.
Did you find what you needed?

 

Welcome to massmind.org!

 

Welcome to techref.massmind.org!

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

  .