<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<body>
<script>
document.oncontextmenu = function(e) {
return false;
}
function self()
{
if(document.all){
window.event.returnValue = false;
}
}
function click1(e){
var e=e||window.event;
alert(e.button);
}
</script>
<div id="test" style="font-size:12px;width:100px;height:100px;background:#000" oncontextmenu="self()" onmousedown="click1(event);">右击</div>
</body>
</html>
chrome 2
firefox 2
ie8 2
360 0
TT 0令人费解
<html xmlns="http://www.w3.org/1999/xhtml">
<body>
<script>
document.oncontextmenu = function(e) {
return false;
}
function self()
{
if(document.all){
window.event.returnValue = false;
}
}
function click1(e){
var e=e||window.event;
alert(e.button);
}
</script>
<div id="test" style="font-size:12px;width:100px;height:100px;background:#000" oncontextmenu="self()" onmousedown="click1(event);">右击</div>
</body>
</html>
chrome 2
firefox 2
ie8 2
360 0
TT 0令人费解
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货