作者在 2008-10-05 14:00:15 发布以下内容
页面:
<div>
<asp:TextBox ID="TextBox1" runat="server" Text="鼠标移上试试" ></asp:TextBox>
<br />
<input id="Text1" type="text" value="鼠标移上试试" onmousemove="this.select()"/>
</div>
代码:
this.TextBox1.Attributes.Add("onMouseOver", "this.select()");
<div>
<asp:TextBox ID="TextBox1" runat="server" Text="鼠标移上试试" ></asp:TextBox>
<br />
<input id="Text1" type="text" value="鼠标移上试试" onmousemove="this.select()"/>
</div>
代码:
this.TextBox1.Attributes.Add("onMouseOver", "this.select()");