禁止选中文字兼容IE、Chrome、FF等
$(el).attr('unselectable','on')
.css({'-moz-user-select':'-moz-none',
'-moz-user-select':'none',
'-o-user-select':'none',
'-khtml-user-select':'none', /* you could also put this in a class */
'-webkit-user-select':'none',/* and add the CSS class here instead */
'-ms-user-select':'none',
'user-select':'none'
}).bind('selectstart', function(){ return false; });
根据上面分析 可以设置 你需要禁止选中文字区域的 css。如:
.table {
text-align: center;
vertical-align:middle;
height: 39px;
overflow: hidden;
moz-user-select: -moz-none;
-moz-user-select: none;
-o-user-select:none;
-khtml-user-select:none; /* you could also put this in a class */
-webkit-user-select:none;/* and add the CSS class here instead */
-ms-user-select:none;
user-select:none;/**禁止选中文字*/
}相关阅读:
js使用for循环查询数组中是否存在某个值
css教程之绝对定位使用详解
JQuery加载图片自适应固定大小的DIV
jQuery中事件对象e的事件冒泡用法示例介绍
win7系统无法修改文件夹的只读属性的设置方法图文教程
jquery ui resize 中border-box的bug修正
解决Java J2EE乱码问题的方法
C#中Cookie之存储对象
推送在即:Win10 Mobile一周年更新正式版14393.67已上传至服务器
win10手机预览版怎么快速切换键盘输入法图文教程
asp将本地的文件上传到服务器
Win10 10565预览版打印机怎么恢复默认设置?
avalon js实现仿google plus图片多张拖动排序附源码下载
常见的jQuery选择器汇总