<div class="codetitle"> <span><a style="CURSOR: pointer" data="40856" class="copybut" id="copybut40856" onclick="doCopy('code40856')"><u>复制代码</u></a></span> 代码如下:</div> <div class="codebody" id="code40856"> <br><br><br><title>响应鼠标自动选中文本框内容</title> <br><br><br><input id="a" type="text" value="请输入搜索词" onmouseover="selectInputContent(this.id)"><br><script type="text/javascript"><BR>function selectInputContent(n){<BR> obj =document.getElementById(n);<BR> obj.focus();<BR> obj.select();<BR>}<BR></script><br><br><br> </div>