我有外部链接,可以使用 javascript onclick 事件呈现图像。
我需要停止此点击事件。我该怎么做?
例如:
Html is render by external script:
<div class="demo-link">
<img alt="" onclick="verifylock();" src="https://example.com" style="cursor:pointer;cursor:hand">
</div>
我已经用 jquery 尝试过了,但没有得到任何运气:
$(".demo-link > img").click(function(e){
e.preventDefault();
});
最佳答案
关于javascript - 如何停止javascript onclick事件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28426939/