尝试检测左键单击与右键单击(不使用 jQuery!),我有以下代码
Javascript:
function cclick(e) {
if (e.button == 1) {alert("hgbdygwea");}
else {
alert(e.button);
}
}
HTML:
<a onmouseup="cclick()" ...> <img .../> </a> <!-- also tried cclick instead of cclick() -->
使用 Internet Explorer 9