禁用文本选择高亮

-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-o-user-select: none;
user-select: none;

注意:
IE 不支持 CSS 方法,我们要用 HTML 属性 unselectable="on" (via: msdn.microsoft.com)

<div unselectable="on">
In Internet Explorer and Opera, it is selectable only if the selection starts outside.
</div>

或者 JavaScript

// 阻止选择整个网页
window.onload = function() {
  document.onselectstart = function() {return false;} // ie
  document.onmousedown = function() {return false;} // mozilla
}

// 或者阻止选择 #blockme
window.onload = function() {
  var element = document.getElementById('blockme');
  element.onselectstart = function () { return false; } // ie
  element.onmousedown = function () { return false; } // mozilla
}

// via: http://javascriptsource.com/page-details/disable-text-selection.html

例子: 查看演示

via: (1) stackoverflow.com (2) dottoro.com

更新:微软的 Test Drive 演示