Home >Web Front-end >JS Tutorial >Summary of differences in browser support for click methods_javascript skills

Summary of differences in browser support for click methods_javascript skills

WBOY
WBOYOriginal
2016-05-16 18:04:161363browse

as follows

IE6/7/8/9/Opera12/Firefox5 Safari5/Chrome12
INPUT[type=text]
INPUT[type=password]
INPUT[type=radio]
INPUT[type=checkbox]
INPUT[type=button]
INPUT[type=submit]
INPUT[type=image]
INPUT[type=hidden]
INPUT[type=reset]
INPUT[type=submit]
INPUT[type=file]1
BUTTON[type=button]
支持 支持
other 支持 不支持

That is, Safari/Chrome does not fully support the click method. The click method is included in the HTML5 draft, and I believe Safari/Chrome will also support it in the near future.

It should be noted that not all elements in versions prior to Firefox 5 support the click method, as can be seen from the test results of w3help at that time.

Mozilla official also has the following words

Prior to Gecko 5.0 (Firefox 5.0 / Thunderbird 5.0 / SeaMonkey 2.2), Gecko didn't implement the click method on other elements that might be expected to respond to mouse–clicks such as links (A elements), nor will it necessarily fire the click event of other elements. However, now it is supported by all elements, as required by HTML5.

Although Firefox5 now adds click methods to all elements, you still need to note that its click method cannot trigger A's default behavior . IE/Opera can.

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn