当前位置: 代码迷 >> JavaScript >> input type=text获取焦点时全选已输入的内容,使用input的onfocus=this.select()在IE上无效
  详细解决方案

input type=text获取焦点时全选已输入的内容,使用input的onfocus=this.select()在IE上无效

热度:238   发布时间:2013-02-24 17:58:56.0
input type=text获取焦点时全选已输入的内容,使用input的onfocus=this.select()在IE下无效
input type=text获取焦点时全选已输入的内容,使用input的onfocus=this.select()在IE下无效

请问如何解决? 火狐可以 IE全版本都不行 那肯定是我写错了  但是问题出在哪里呢
input

------解决方案--------------------
按标准来写,引号不要省。省的出问题不好找。

<input value="aaaa" onfocus="this.select()"/>
------解决方案--------------------
这样试试
<input type="text" onfocus="this.select();"  onmouseup="this.select();" value="test"  >
  相关解决方案