我有以下短代码
<body oncontextmenu="return false">
<p class="info">
Books are the world of information. As said the books are the best friends. A wise
man always has a library of several books</p>
<ul id="contextmenu">
........
JS:
$('.info').mousedown(function (event) {
if (event.button == 2) {
$('#contextmenu').show();
}
}
当我右键单击 .info 时,我希望浏览器的上下文菜单不会与我们的上下文菜单一起默认显示。
oncontextmenu="return false"
不工作