久久久久久久视色,久久电影免费精品,中文亚洲欧美乱码在线观看,在线免费播放AV片

<center id="vfaef"><input id="vfaef"><table id="vfaef"></table></input></center>

    <p id="vfaef"><kbd id="vfaef"></kbd></p>

    
    
    <pre id="vfaef"><u id="vfaef"></u></pre>

      <thead id="vfaef"><input id="vfaef"></input></thead>

    1. 站長(zhǎng)資訊網(wǎng)
      最全最豐富的資訊網(wǎng)站

      html如何禁止右鍵

      html禁止右鍵方法:1、使用oncontextmenu事件,禁用鼠標(biāo)右鍵的菜單;2、使用onselectstart事件,禁止利用右鍵在網(wǎng)頁(yè)上選取內(nèi)容;3、使用oncopy事件,禁止利用右鍵進(jìn)行復(fù)制。

      html如何禁止右鍵

      本教程操作環(huán)境:windows7系統(tǒng)、CSS3&&HTML5版、Dell G3電腦。

      oncontextmenu事件禁用右鍵菜單

      document.oncontextmenu = function(){     event.returnValue = false; }// 或者直接返回整個(gè)事件 document.oncontextmenu = function(){     return false; }

      onselectstart事件禁用網(wǎng)頁(yè)上選取的內(nèi)容

      document.onselectstart = function(){     event.returnValue = false; }// 或者直接返回整個(gè)事件 document.onselectstart = function(){     return false; }

      oncopy事件禁用復(fù)制

      document.oncopy = function(){     event.returnValue = false; }// 或者直接返回整個(gè)事件 document.oncopy = function(){     return false; }

      以上三種事件,如果只想單純的禁用鼠標(biāo)右鍵,和復(fù)制粘貼,還可以將它們直接寫(xiě)到HTML中的body上面;

      <body oncontextmenu = "return false" ></body>  <body onselectstart = "return false" ></body>  <body oncopy = "return false" ></body>

      推薦學(xué)習(xí):html視頻教程

      贊(0)
      分享到: 更多 (0)
      網(wǎng)站地圖   滬ICP備18035694號(hào)-2    滬公網(wǎng)安備31011702889846號(hào)