网页中屏蔽鼠标右键、Ctrl+N、Shift+F10

4 篇文章 0 订阅
<script language="Javascript">
 //屏蔽鼠标右键、Ctrl+N、Shift+F10、F5刷新、退格键
 //屏蔽F1帮助
function window.onhelp()
{
 return false
}
function KeyDown()
{
  //alert(event.keyCode);
 //屏蔽 Alt+ 方向键 ← 屏蔽 Alt+ 方向键 →
  if ((window.event.altKey)&&((window.event.keyCode==37)||(window.event.keyCode==39)))
  { 
     //alert("不准你使用ALT+方向键前进或后退网页!");
     event.returnValue=false;
  }
  //屏蔽退格删除键,屏蔽 F5 刷新键,Ctrl + R
  if ((event.keyCode==116)||(event.ctrlKey && event.keyCode==82))
  {
     event.keyCode=0;
     event.returnValue=false;
  }
 
  //屏蔽 Ctrl+n
  if ((event.ctrlKey)&&(event.keyCode==78))
  { 
     event.returnValue=false;
  }
 
  //屏蔽 shift+F10
  if ((event.shiftKey)&&(event.keyCode==121))
  {
     event.returnValue=false;
  }
 
  //屏蔽 shift 加鼠标左键新开一网页
  if (window.event.srcElement.tagName == "A" && window.event.shiftKey)
  {
  window.event.returnValue = false;
  }
     
   //屏蔽Alt+F4
  if ((window.event.altKey)&&(window.event.keyCode==115))
  {
  window.showModelessDialog("about:blank","","dialogWidth:1px;dialogheight:1px");
  return false;
  }
 
  //屏蔽Ctrl+A
  if((event.ctrlKey)&&(event.keyCode==65))
  {
 return false;
  }
   
}
</script>
<body οnkeydοwn="KeyDown()" onselectstart="return false" οncοntextmenu="event.returnValue=false" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="buttonface">
  <tr>
    <td>
      <table border="0" cellspacing="0" cellpadding="0">
        <tr valign="bottom">
          <td nowrap style="cursor:hand" onClick="window.external.AddFavorite('http://www.163.com', '网易163)" onMouseOver="javascript:this.className='menuMouseOver'" onMouseDown="javascript:this.className='menuMouseDown'" onMouseOut="javascript:this.className='menuMouseOut'" class="menuMouseOut">
            <table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td nowrap><img src="../../images/sunico14.gif" width="18" height="18"></td>
                <td valign="bottom" nowrap class="tdTitle">收藏&nbsp;</td>
              </tr>
            </table></td>
          <td nowrap style="cursor:hand" onClick ="document.execCommand('saveAs')" onMouseOver="javascript:this.className='menuMouseOver'" onMouseDown="javascript:this.className='menuMouseDown'" onMouseOut="javascript:this.className='menuMouseOut'" class="menuMouseOut">
            <table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td nowrap><img src="../../images/sunico8.gif" width="18" height="18"></td>
                <td valign="bottom" nowrap class="tdTitle">保存&nbsp;</td>
              </tr>
            </table></td>
          <td nowrap style="cursor:hand" onClick="document.execCommand('print')" onMouseOver="javascript:this.className='menuMouseOver'" onMouseDown="javascript:this.className='menuMouseDown'" onMouseOut="javascript:this.className='menuMouseOut'" class="menuMouseOut">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td nowrap><img src="../../images/sunico9.gif" width="18" height="18"></td>
                <td valign="bottom" nowrap class="tdTitle">打印</td>
              </tr>
            </table></td>
        </tr>
      </table></td>

 <td align="right" class="tdTitle"><a href="#" onClick ="window.open('Reply_Edit.asp?Process_Type=AddNew&Article_ID=26','','scrollbar=no,top=100,left=100,width=500,height=400')">
                  <font color="#FFFF00">
                 
                  <a href="#" onClick="alert('如果您是会员请先登陆!如果不是请先注册!/n/n版权所有:163在线!');"><font color="#FFFF00">我要发表评论</font></a>
                 
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值