如何在IE,Opera和&amp ;;上重新启用文本选择的Webkit?
我这样禁用了它:
$(this).mousedown(function(){return true;}); //Opera, webkit
$(this).bind('selectstart',function(){return true;}); //IE
(使用firefox,我可以使用$(this).css('MozUserSelect','text')
轻松重新启用它;
答案 0 :(得分:2)
我认为最好的办法是unbind事件监听器。
答案 1 :(得分:1)
请勿使用bind()
和unbind()
方法。请改用on()
和off()
- 首选jQuery 1.7及更高版本。