如何关注ASP.NET中的禁用下拉列表 [英] How to focus for disable dropdown in ASP.NET
本文介绍了如何关注ASP.NET中的禁用下拉列表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
你好我在我的页面中有一个下拉菜单,并希望将其集中在一个条件上,但问题是我的下拉菜单是禁用的,并且想要设置焦点以启用它。但在禁用模式下,我可以集中注意力。
我尝试过:
i已经尝试过这个焦点。
myddl.focus();
但它在禁用和工作正常时无效mode
hello i have a drop down in my page and want to focus that on a condition but the problem is that my drop down is disable and want to set focus for enable it. but in disable mode i can able to focus that.
What I have tried:
i have tried this for focus.
myddl.focus();
but it is not working in disable and working fine in enable mode
推荐答案
如果要启用控件,则启用它。但是,您无法专注于已禁用的控件。您必须先启用它,然后将焦点设置为它。
If you want to enable a control then you enable it. However, you cannot focus on a control that is disabled. You will have to enable it first and then set focus to it.
这篇关于如何关注ASP.NET中的禁用下拉列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文