从服务器端更改文本框的焦点 [英] Change focus of textbox from serverside
本文介绍了从服务器端更改文本框的焦点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
Hello All,
我的网页上有三个文本框。如果用户在第一个文本框中输入4个字符,则应将焦点更改为第二个文本框。我已经完成了使用脚本,但我需要在codebehind(serverside)。我搜索过但没有得到任何东西。
请帮帮我。
谢谢
Naveen
Hello All,
I have three text boxes on my web page. If user enter 4 chars in first textbox it should change focus to second text box. I have done using script but I need on codebehind (serverside). I have searched but did not get anything.
Please help me on this.
Thanks
Naveen
推荐答案
请参阅我对该问题的评论。让我继续:
...但是,您可以从HTTP请求返回带有JavaScript的HTML;这个JavaScript可以调用一些元素的函数focus()
:
http://www.w3schools.com/jsref/met_html_focus.asp [ ^ ]。
-SA
Please see my comment to the question. Let me continue:
…However, you can return the HTML with JavaScript from you HTTP request; and this JavaScript can call some element''s functionfocus()
:
http://www.w3schools.com/jsref/met_html_focus.asp[^].
—SA
>
这篇关于从服务器端更改文本框的焦点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文