亚洲乱码中文字幕综合,中国熟女仑乱hd,亚洲精品乱拍国产一区二区三区,一本大道卡一卡二卡三乱码全集资源,又粗又黄又硬又爽的免费视频

各瀏覽器對click方法的支持差異小結(jié)

 更新時間:2011年07月31日 21:57:58   投稿:mdxy-dxy  
click方法可以用來模擬用戶點擊。有的瀏覽器中所有元素都具有click方法,有的瀏覽器則沒有。

如下

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 支持 不支持

即Safari/Chrome沒有完全支持click方法。click方法寫進(jìn)了HTML5草案,相信不久的將來Safari/Chrome也會支持。

需要注意的Firefox5之前的版本并不是所有元素都支持click方法,從w3help當(dāng)時測試結(jié)果即可看出。

Mozilla官方也有以下一段話

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.  

雖然Firefox5現(xiàn)在對所有元素都添加了click方法,仍需注意它的click方法觸發(fā)不了A的默認(rèn)行為。IE/Opera卻可以。

相關(guān)文章

最新評論