Ale*_*mes 3 jquery internet-explorer click
快速点击IE的响应速度比firefox,chrome和safari慢.为什么?(我正在使用jquery)
这是因为Internet Explorer将连续两次快速点击解释为一次单击,然后一次双击,而其他浏览器将其解释为两次单击和双击.
尝试对此进行测试,以了解每个浏览器对双击的反应.
<html>
<head>
<script type='text/javascript'>
function onclick_test()
{
var console = document.getElementById('console');
console.appendChild(document.createTextNode('onclick'));
console.appendChild(document.createElement('br'));
}
function ondblclick_test()
{
var console = document.getElementById('console');
console.appendChild(document.createTextNode('ondblclick'));
console.appendChild(document.createElement('br'));
}
</script>
</head>
<body>
<span style='border:1px solid blue;' onclick='onclick_test();' ondblclick='ondblclick_test();'>Click me</span>
<div id='console'></div>
</body>
</html>
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
566 次 |
| 最近记录: |