Chrome扩展程序:如何获取/检测任何页面或任何位置的点击事件。就像Google字典插件一样吗?
例如。单击表格或表格等。
这是代码,
$(".myTable").on('click', 'tr', function () {
var trValue = $(this).attr('value');
var tdValue = $(this).children('td').map(function (index, val) {
return $(this).text();
}).toArray();
console.log(tdValue);});
Run Code Online (Sandbox Code Playgroud)