求一页面全屏,屏蔽所有键盘操作,且页面不能右键的代码

suncheng_hong suncheng_hong 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
我只实现了全屏
<input type="BUTTON" name="FullScreen" value="考试" onClick="window.open('beginExam.asp', 'big', 'fullscreen=yes')">
但 beginExam.asp中

<script language="javascript">

if (window.Event)
document.captureEvents(Event.MOUSEUP);

function nocontextmenu()
{
event.cancelBubble = true
event.returnValue = false;

return false;
}

function norightclick(e)
{
if (window.Event)
{
if (e.which == 2 || e.which == 3)
return false;
}
else
if (event.button == 2 || event.button == 3)
{
event.cancelBubble = true
event.returnValue = false;
return false;
}

}

document.oncontextmenu = nocontextmenu; // for IE5+
document.onmousedown = norightclick; // for all others


</script>

没有起作用,谁有没有全屏,屏蔽键盘,屏蔽右键的代码,发一份,实在懒得找了。谢谢。
...全文

相关推荐

评论 9
收藏 已收藏
分享
返回顶部
suncheng_hong
ASP 28,401 成员 356,940 内容