欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  php教程

Asp.net 文本框全选的实现

程序员文章站 2022-06-12 09:35:55
...
一、鼠标滑过textbox全选
前台:
dsdsds

dsdsds
后台:
this.txtbox1.Attributes.Add("onMouseOver", "this.focus();this.select();");

二、得到焦点
后台:
textbox1.Focus();
textbox1.Attributes.Add("onfocus","this.select()");