JavaScript:oncontextmenu使页面内右键菜单失效

在html页面上右击,会弹出菜单选项,下面令其失效,不管怎么右键,都不会出现以上菜单

<!DOCTYPE html>
<html>
<head>
	<title>右键菜单失效</title>
<script type="text/javascript">
	document.oncontextmenu = function(){
		return true;
	}
</script>
</head>
<body>

</body>
</html>

 

posted @ 2020-02-17 16:54  昨夜昙花  阅读(89)  评论(0)    收藏  举报