js 自定义右键
document.getElementById("id").oncontextmenu = (function () {
return function (e) { e.preventDefault(); };
})();
document.onmousedown = function () {
if (event.button == 1) { alert("left") }
if (event.button == 2) {
document.getElementById("id").onmouseup = (function () {
return function () {
if (event.button == 2) {
$("#moreUlF-0").toggle();//自定义的右键栏
}
};
}
}
再三须慎意,第一莫欺心