▶ JS方法:
// firefox下禁止元素被选取的变通办法
element.onmousedown = new Function("return false");
element.onmouseup = new Function("return true");
//IE下
var clearSelect = 'getSelection' in window ? function(){
window.getSelection().removeAllRanges();
} : function(){
document.selection.empty();
};
▶ CSS方法:user-select属性
div {
-moz-user-select:none;
-webkit-user-select:none;
user-select:none;
}