📜  chrome 扩展 onclick 不起作用 - 无论代码示例

📅  最后修改于: 2022-03-11 15:00:09.253000             🧑  作者: Mango

代码示例1
window.onclick = function(event) {
        var target = event.target;
        console.log(target.matches);
        //console.log(event);
        if (target.matches('.clickableBtn')) {
         alert('Called Classsname clickableBtn');
        }
        if (target.matches('#qidirish')){
            alert('Called identifer qidirish');
        }
}