可以在input中添加unselectable=“on” οnfοcus="this.blur()"最终为
<input type="text" readonly="readonly" unselectable="on" onfocus="this.blur()"/>
或者
假如
input
框id
为"user_name
"
$('#user_name').focus(function(){
$(this).blur(); //设置文本框取消获得焦点
});
可以在input中添加unselectable=“on” οnfοcus="this.blur()"最终为
<input type="text" readonly="readonly" unselectable="on" onfocus="this.blur()"/>
或者
假如
input
框id
为"user_name
"
$('#user_name').focus(function(){
$(this).blur(); //设置文本框取消获得焦点
});