jquery - 发送双击到 Internet Explorer
问题描述
我希望双击 HTML 表格行来选择记录。
我找到了发送左键的元素,但我无法发送双击。我检查了选择没有鼠标事件控件/属性,我认为这是因为它使用了 jquery / java 函数。
我无法分享网站。我知道它可以做到,因为有人有,但他们没有分享它。
我认为与我们需要的功能有关的代码
/* double click on table row */
jQuery(tableId ).on('dblclick', ' tbody tr',function() {
if(isAutoNextEnabled!=null && isAutoNextEnabled=='Y'){
createAutoNextListNew(oTable, tableName, this);
}
window[functionName](this);
});
由于我无法共享 URL,我找到了一个替代https://unixpapa.com/js/testmouse-2.html
这是一个检测我们点击的网站。它捕获单击左键,但不捕获双击。
我知道提供的网站有一个 firevent 选项,但我需要此功能的网站没有。
这适用于从网站(https://unixpapa.com/js/testmouse-2.html)单击一次,它会捕获一次左键单击:
set ta = objie.getElementsByTagName
for each x in ta
if x = [[our target ]]
x.click
end if
next x
当我双击时它不起作用
for each x in ta
if x = [[our target ]]
x.doubleclick
end if
next x
或者
for each x in ta
if x = [[our target ]]
x.doubleclick
end if
next x
解决方案
你看过jquery api双击吗?
https://api.jquery.com/dblclick/
推荐阅读
- r - 在 R 中,如何将没有相同列的数据框组合到大数据框。谢谢
- ansible - 从 ansible-playbook 获取为 docker-ce 运行的实际命令
- r - 在 R 中找到所有适用的方法
- python - 我如何在相同的场景中使用相同的步骤,但在 pytest-bdd 中使用不同的参数?
- javascript - React Pubnub 聊天。消息复制或根本没有消息
- pandas - 可以使用 np.where 检查向量中的条件,但输出二维数组中的行
- javascript - 在做出另一个请求之前取消上一个请求(如果有的话),同时在反应中使用去抖动
- python - 从python中的嵌套元组中获取值
- r - GARCH 警告:不推荐使用公式(x)
- reactjs - 使用 GIT_USER= 在 GitHub 页面上部署 Docusaurus V2
纱线部署打印“-bash:没有这样的文件”