从列表框选择索引更改后调用后,将焦点添加到文本框 [英] Adding focus to text box after calling from listbox selected index change

查看:80
本文介绍了从列表框选择索引更改后调用后,将焦点添加到文本框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨 当我单击任何项​​目时,我都有列表框,它会打开一个新的div并将其重定向到新页面.如果我关闭该div,我希望它应将焦点放在所需的文本框中...
任何帮助将不胜感激.

欢呼声:)
感谢

Hi i have listbox when i click on any item it opens up a new div that redirects to new page.what i want that if i close that div then it should take focus to the desired text box...
any help would be greatly appreciated.

cheers :)
thanks

推荐答案

使用javascript,当您关闭div时可以使文本框突出显示
代码在
using javascript you can focus the textbox when you close the div
code is below
document.getElementById(''divContainer'').style.visibility = ''hidden''; //Close the DIV
document.getElementById(''<%= this.txtitem.ClientID %>'').focus(); //Focus the Textbox


这篇关于从列表框选择索引更改后调用后,将焦点添加到文本框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆