function CustomClick() {
var e = window.event;
if (e.button == 1) {
alert("点击了左键!");
} else if (e.button == 2) {
alert("点击了右键!");
}
}
document.onmousedown = CustomClick;
JS获取鼠标事件
最新推荐文章于 2023-06-17 18:13:21 发布