标签:blog io ar java on div log cti ad
在这里我封装了一个阻止页面右键的函数,目前是初学,可能还不太完善:
<script> function addEvent(obj,sEv,fn){ if(obj.addEventListener){ obj.addEventListener(sEv,fn,false); }else{ attachEvent(‘on‘+sEv,fn); } } window.onload=function(){ addEvent(document,‘contextmenu‘,function(ev){ var oEvent=ev||event; oEvent.preventDefault && oEvent.preventDefault(); return false; }) } </script>
标签:blog io ar java on div log cti ad
原文地址:http://www.cnblogs.com/wujidns/p/4109290.html