防止双击文字选中

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;');

  

posted @ 2018-12-30 20:20  黎明之光123  阅读(245)  评论(0编辑  收藏  举报