gpt4 book ai didi

jquery - 快速点击IE比firefox、chrome、safari react 慢。为什么? (我使用jquery)

转载 作者:行者123 更新时间:2023-12-01 00:38:42 26 4
gpt4 key购买 nike

快速点击 IE 的响应速度比 firefox、chrome 和 safari 慢。为什么?(我使用jquery)

最佳答案

这是因为 Internet Explorer 将连续两次快速单击解释为一次单击,然后是一次双击,而其他浏览器将其解释为两次单击和一次双击。

尝试对此进行测试,看看每个浏览器对双击有何 react 。

<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>

关于jquery - 快速点击IE比firefox、chrome、safari react 慢。为什么? (我使用jquery),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2815555/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com