Asp.net text box all selected implementation

  • 2020-03-31 17:05:53
  • OfStack

One, the mouse over the textbox all selected
Front desk:
< Asp: TextBox runat = "server" onMouseOver = "this. Focus (); This. The select () "> Dsdsds< / asp: TextBox>
or
< Asp: TextBox runat = "server" onMouseOver = "this. Focus ()" an onFocus = "this. The select ()" > Dsdsds< / asp: TextBox>
Background:
Enclosing txtbox1. Attributes. Add (" onMouseOver, enclosing the focus (); This. The select ();" );

Get focus
Background:
Textbox1. Focus ();
Textbox1. Attributes. The Add (" an onfocus ", "this. The select ()");

Related articles: