欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

禁止IE用右鍵的JS代碼

 更新時(shí)間:2013年12月30日 14:56:59   投稿:shangke  
這篇文章主要介紹了禁止IE用右鍵的JS代碼,有需要的朋友可以參考一下

復(fù)制代碼 代碼如下:

<!--禁止網(wǎng)頁(yè)右鍵: -->

document.body.oncontextmenu=function rightClick(){ window.event.returnValue= false;}

<!--禁止網(wǎng)頁(yè)另存為: -->
<noscript><iframe src=*.html></iframe></noscript>

<!-- 禁止選擇文本: -->
<script type="text/javascript">

var omitformtags=["input", "textarea", "select"]

omitformtags=omitformtags.join("|")

function disableselect(e){
if (omitformtags.indexOf(e.target.tagName.toLowerCase())==-1)
return false
}

function reEnable(){
return true
}

if (typeof document.onselectstart!="undefined")
document.onselectstart=new Function ("return false")
else{
document.onmousedown=disableselect
document.onmouseup=reEnable
}
</script>

<!-- 禁用右鍵: -->
<script>
function stop(){
return false;
}
document.oncontextmenu=stop;
</script>

相關(guān)文章

最新評(píng)論