asp.net鼠标移过文本框时自动全选文本框

1.<asp:TextBox ID="TextBox1" runat="server" onMouseOver="this.focus()" onFocus="this.select()" >dsdsds</asp:TextBox>

2.<asp:TextBox ID="TextBox1" runat="server" onMouseOver="this.focus();this.select()" >dsdsds</asp:TextBox>

3. 后台

{

}

if (!IsPostBack)this.txtbox1.Attributes.Add("onMouseOver", "this.focus();this.select();");

你可能感兴趣的:(.net,asp.net,asp)