Navigator 2.0, Internet Explorer 3.0
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.
file: /Techref/language/java/script/definitive/refp_100.htm, 5KB, , updated: 2019/10/14 15:00, local time: 2024/11/8 09:50,
18.188.212.54:LOG IN ©2024 PLEASE DON'T RIP! THIS SITE CLOSES OCT 28, 2024 SO LONG AND THANKS FOR ALL THE FISH!
|
©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? <A HREF="http://linistepper.com/Techref/language/java/script/definitive/refp_100.htm"> [Chapter 21] Reference: Element.click()</A> |
Did you find what you needed? |