导航栏: 首页 评论列表

兼容firefox/IE的 取消 选择 文本

默认分类 2011-09-15 04:51:49

  1. if (document.selection && document.selection.empty)   
  2.     document.selection.empty() ;  
  3. else if(window.getSelection)   
  4. {  
  5.     var sel=window.getSelection();  
  6.     if(sel && sel.removeAllRanges)  
  7.     sel.removeAllRanges() ;  
  8. }  


>> 留言评论