在html页面上右击,会弹出菜单选项,下面令其失效,不管怎么右键,都不会出现以上菜单
<!DOCTYPE html>
<html>
<head>
<title>右键菜单失效</title>
<script type="text/javascript">
document.oncontextmenu = function(){
return true;
}
</script>
</head>
<body>
</body>
</html>
在html页面上右击,会弹出菜单选项,下面令其失效,不管怎么右键,都不会出现以上菜单
<!DOCTYPE html>
<html>
<head>
<title>右键菜单失效</title>
<script type="text/javascript">
document.oncontextmenu = function(){
return true;
}
</script>
</head>
<body>
</body>
</html>