防止双击文字选中

if(document.all){
        document.onselectstart= function(){return false;}; //for ie
      }else{
        document.onmousedown= function(){return false;};
        document.onmouseup= function(){return true;};
      }
      document.onselectstart = new Function('event.returnValue=false;');

  

猜你喜欢

转载自www.cnblogs.com/holy-amy/p/10200558.html