小 小宇1 Unregistered / Unconfirmed GUEST, unregistred user! 2004-03-12 #1 在asp.net中如何做到在页面一显示的时候或做完某一事件后使页面中的某一控件(如txtbox)获得焦点呢?有哪一属性可以设置还是要写代码,如何写?谢谢!
W wwhuzhen Unregistered / Unconfirmed GUEST, unregistred user! 2004-03-15 #2 比如你要你的TEXTbox1在鼠标滑过的时候获得焦点: private void Page_Load(object sender, System.EventArgs e) { TEXTbox1.Attributes.Add("onMouseOver","this.focus()"); TEXTbox1.Attributes.Add("onFocus","this.select()"); }
比如你要你的TEXTbox1在鼠标滑过的时候获得焦点: private void Page_Load(object sender, System.EventArgs e) { TEXTbox1.Attributes.Add("onMouseOver","this.focus()"); TEXTbox1.Attributes.Add("onFocus","this.select()"); }
F flymoon Unregistered / Unconfirmed GUEST, unregistred user! 2004-05-06 #3 比如你要你的TEXTbox1在鼠标滑过的时候获得焦点: private void Page_Load(object sender, System.EventArgs e) { TEXTbox1.Attributes.Add("onMouseOver","this.focus()"); TEXTbox1.Attributes.Add("onFocus","this.select()"); }
比如你要你的TEXTbox1在鼠标滑过的时候获得焦点: private void Page_Load(object sender, System.EventArgs e) { TEXTbox1.Attributes.Add("onMouseOver","this.focus()"); TEXTbox1.Attributes.Add("onFocus","this.select()"); }