日期:2014-05-16  浏览次数:20396 次

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"  >