一、鼠标滑过textBox全选
前台:
<asp:TextBox runat="server" onMouSEOver="this.focus();this.select()">dsdsds</asp:TextBox>
或
<asp:TextBox runat="server" onMouSEOver="this.focus()" onFocus="this.select()">dsdsds</asp:TextBox>
后台:
this.txtBox1.Attributes.Add("onMouSEOver","this.focus();this.select();"); 二、得到焦点
后台:
textBox1.Focus();
textBox1.Attributes.Add("onfocus","this.select()");