JSCode all of Brower 全局屏蔽網(wǎng)頁右鍵功能 具體實現(xiàn)
[javascript]
<script type="text/javascript">
function clickIE4(){
if (event.button==2){
return false;
}
}
function clickNS4(e){
if (document.layers||document.getElementById&&!document.all){
if (e.which==2||e.which==3){
return false;
}
}
}
function OnDeny(){
if(event.ctrlKey || event.keyCode==78 && event.ctrlKey || event.altKey || event.altKey && event.keyCode==115){
return false;
}
}
if (document.layers){
document.captureEvents(Event.MOUSEDOWN);
document.onmousedown=clickNS4;
document.onkeydown=OnDeny();
}else if (document.all&&!document.getElementById){
document.onmousedown=clickIE4;
document.onkeydown=OnDeny();
}
document.oncontextmenu=new Function("return false");
</script>
<script type="text/javascript">
function clickIE4(){
if (event.button==2){
return false;
}
}
function clickNS4(e){
if (document.layers||document.getElementById&&!document.all){
if (e.which==2||e.which==3){
return false;
}
}
}
function OnDeny(){
if(event.ctrlKey || event.keyCode==78 && event.ctrlKey || event.altKey || event.altKey && event.keyCode==115){
return false;
}
}
if (document.layers){
document.captureEvents(Event.MOUSEDOWN);
document.onmousedown=clickNS4;
document.onkeydown=OnDeny();
}else if (document.all&&!document.getElementById){
document.onmousedown=clickIE4;
document.onkeydown=OnDeny();
}
document.oncontextmenu=new Function("return false");
</script>
相關文章
web3.js增加eth.getRawTransactionByHash(txhash)方法步驟
這篇文章主要介紹了web3.js增加eth.getRawTransactionByHash(txhash)方法步驟,需要的朋友可以參考下2018-03-03關于微信小程序中使用wx.getLocation獲取當前詳細位置并計算距離
這篇文章主要介紹了關于微信小程序中使用wx.getLocation獲取當前詳細位置并計算距離,wx.getLocation只能夠獲取經(jīng)緯度,不能夠拿到詳細地址,這里使用騰訊地圖的api,需要的朋友可以參考下2023-04-04IE6-IE9不支持table.innerHTML的解決方法分享
讓ie6-ie9支持table.innerHTML,其實這里只是對table做了處理,對其他不支持的元素可以用類似的方案2012-09-09Javascript 數(shù)組去重的方法(四種)詳解及實例代碼
這篇文章主要介紹了Javascript 數(shù)組去重的方法(四種)詳解及實例代碼的相關資料,這里對四種去重方法進行了詳細介紹,并附代碼實例,需要的朋友可以參考下2016-11-11JavaScript 開發(fā)中規(guī)范性的一點感想
在開發(fā)中通用的幾個方法,我們把它們放到utility目錄下或者utility.js中;所有的提示信息和報錯信息統(tǒng)一放置在一起??雌饋矶际切⌒〉膸撞?,卻能讓咱們開發(fā)的代碼同事讀起來更順暢,下個項目中也能用上。2009-06-06