Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想使用 Jquery 触发对表的第一行(在页面加载时)的双击。在我的程序中,我正在使用以下代码:
$(document).ready(function() { setTimeout(function() { $("table tr td:first").trigger('dbclick'); },10); });..
但它不工作......我该怎么办?请给一些想法..
您的代码中有输入错误
$("table tr td:first").trigger('dbclick');
它dblclick不是dbclick。如下替换您的代码。
dblclick
dbclick
$("table tr td:first").trigger('dblclick');