页面里有frame的怎么禁用f5和ctrl+r
展开全部
<script language="javascript">
function DisableKey()
{
//8 退格键
//116 F5 刷新键
//82 Ctrl + R
//121 shift+F10
//115 屏蔽Alt+F4
//屏蔽 shift 加鼠标左键新开一网页
if (window.event.keyCode==
||event.keyCode==116
||event.keyCode==82
||event.keyCode==121
||event.keyCode==115
||(window.event.srcElement.tagName == "A" && window.event.shiftKey))
{
alert('请通过事物代码进行操作!');
window.event.returnValue=false;
}
}
</script>
</HEAD>
< body MS_POSITIONING="GridLayout" onKeyDown="DisableKey()">
function DisableKey()
{
//8 退格键
//116 F5 刷新键
//82 Ctrl + R
//121 shift+F10
//115 屏蔽Alt+F4
//屏蔽 shift 加鼠标左键新开一网页
if (window.event.keyCode==
||event.keyCode==116
||event.keyCode==82
||event.keyCode==121
||event.keyCode==115
||(window.event.srcElement.tagName == "A" && window.event.shiftKey))
{
alert('请通过事物代码进行操作!');
window.event.returnValue=false;
}
}
</script>
</HEAD>
< body MS_POSITIONING="GridLayout" onKeyDown="DisableKey()">
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询