这段JavaScript为什么不能执行啊
来源:百度知道 编辑:UC知道 时间:2024/06/01 18:07:36
<html>
<head>
<title>无标题文档</title>
<script language="javascript">
function hideContextMenu()
{
alert("hello");
window.event.returnValue = false;
}
</script>
</head>
<body oncontextmenu ="hideContextMenu()">
</body>
</html>
哪里错了啊
<head>
<title>无标题文档</title>
<script language="javascript">
function hideContextMenu()
{
alert("hello");
window.event.returnValue = false;
}
</script>
</head>
<body oncontextmenu ="hideContextMenu()">
</body>
</html>
哪里错了啊
没错啊!我试过了,oncontextmenu =“return false”就是屏蔽右键的意思!
你点右键,弹出 "hello"!
没有问题 可以执行呀 你点鼠标右键不就可以看到接过了