标签容器问题 [英] Tab Container Problem
本文介绍了标签容器问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我的aspx页面中有一个Tab容器,其中有一些服务器控件,例如文本框,下拉列表等
我想应用一些功能,使其在页面加载时将焦点放在第一个文本框上,并在按下它时将移到下一个控件上
我已经设置了TabIndex属性,但是它不起作用
I have a Tab container in my aspx page,in that i have some server controls eg textboxes,dropdownlist etc
I want to apply functionality that when page loads it will focus on first text box and on pressing it will move on to next control
i have set the TabIndex property but it is not working
<asp:TextBox ID="txtFName" runat="server" TabIndex="0" ></asp:TextBox>
在加载时焦点没有出现在txtFname上(并且不知道它在哪里),当我第一次按Tab时,焦点移到地址栏
[edit]整理出代码块-OriginalGriff [/edit]
on loading the focus doesnot appear on txtFname(and dont know where it is) and when i press Tab for first time focus moves to address bar
[edit]Code blocks sorted out - OriginalGriff[/edit]
推荐答案
在页面加载时尝试使用此代码
txtFname.focus();
Try this code on page load
txtFname.focus();
这篇关于标签容器问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文