如何在页面加载中设置焦点在tabcontainer的tabpanel上 [英] how to set a focus on tabcontainer's tabpanel in page load
本文介绍了如何在页面加载中设置焦点在tabcontainer的tabpanel上的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何在页面加载中设置焦点在tab-container的选项卡面板上
我无法将焦点设置到标签面板!!
请帮助
代码:
< asp:内容 ID = Content1 ContentPlaceHolderID = CphrEMS runat = server >
< asp:UpdatePanel ID = UpdatePanel1 runat = < span class =code-keyword> server >
< ContentTemplate >
< 表格 >
< tr >
< td align = left >
< ajax:TabContainer ID = tbVisitors runat = server ActiveTabIndex = 1 CssClass = ajax__myTab
< span class =code-attribute> OnActiveTabChanged = tbVisitors_ActiveTabChanged AutoPostBack = true
宽度 = 100% >
< ajax:TabPanel ID = tbpacVisitors runat = 服务器 >
< HeaderTemplate >
< asp:标签 ID = lbl runat = 服务器 文本 = <% $资源:LocalStrings,AddVisitors %> >
< / asp:标签 > < / HeaderTemplate >
< ContentTemplate >
< < span class =code-leadattribute> table >
< div class = newRadio >
< div style = float:left;填充:15px 0 15px 15px; >
< / div >
< / div >
< / table >
< 表 width = 100% >
< tr >
< td align = left width < span class =code-keyword> = 25% >
< asp:Label < span class =code-attribute> ID = lblwhom runat = ser ver 文本 = <% $资源:LocalStrings,WhomToVisit %>
< span class =code-attribute> < span class =code-attribute> CssClass = 标签 > < / asp:标签 > < br / >
< asp:DropDownList ID = ddlwhomtovisit runat = server CssClass = longdropdown AutoPostBack = True
< span class =code-attribute> < span class =code-attribute> OnSelectedIndexChanged = rbtnwhomtovisit_SelectedIndexChanged TabIndex = 1 宽度 = 98% >
< asp:ListItem 值 = 1 > < / asp:ListItem >
< span class =code-keyword>< asp:ListItem 值 = 2 > < / asp:ListItem > 跨度>
< asp:ListItem 值 = 3 < span class =code-keyword>> < / asp:ListItem < span class =code-keyword>>
< / asp:DropDownList >
< / td >
解决方案
资源:LocalStrings,AddVisitors %> >
< / asp:Label > < / HeaderTemplate >
< ContentTemplate >
< table >
< div class = newRadio >
< div style = float:left;填充:15px 0 15px 15px; >
< / div >
< / div >
< / table >
< 表 width = 100% >
< tr >
< td align = left width < span class =code-keyword> = 25% >
< asp:Label < span class =code-attribute> ID = lblwhom runat = ser ver 文本 = <%
资源:LocalStrings,WhomToVisit %>
CssClass = label > < / asp:标签 > < br / >
< asp:DropDownList < span class =code-attribute> ID = ddlwhomtovisit runat = server CssClass = longdropdown AutoPostBack = True
< span class =code-attribute> OnSelectedIndexChanged = rbtnwhomtovisit_SelectedIndexChanged TabIndex < span class =code-keyword> = 1 宽度 = 98% >
< asp:ListItem 值 = 1 > < / asp:ListItem >
< asp:ListItem 值 = 2 > < / asp :ListItem >
< asp:ListItem 值 = 3 > < / asp:ListItem >
< / asp:DropDownList >
< / td >
< blockquote>参考..
var tabContainer = window.Sys.Application.findComponent('<% = tabContainer.ClientID %> ');
tabContainer .set_activeTabIndex(1);
how to set a focus on tab-container's tab-panel in page load
I'm unable to set focus to tab-panel!!
please help
Code:
<asp:Content ID="Content1" ContentPlaceHolderID="CphrEMS" runat="server">
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<table>
<tr>
<td align="left">
<ajax:TabContainer ID="tbVisitors" runat="server" ActiveTabIndex="1" CssClass="ajax__myTab"
OnActiveTabChanged="tbVisitors_ActiveTabChanged" AutoPostBack="true"
Width="100%">
<ajax:TabPanel ID="tbpacVisitors" runat="server">
<HeaderTemplate>
<asp:Label ID="lbl" runat="server" Text="<%$ Resources:LocalStrings,AddVisitors %>">
</asp:Label></HeaderTemplate>
<ContentTemplate>
<table>
<div class="newRadio">
<div style="float: left; padding: 15px 0 15px 15px;">
</div>
</div>
</table>
<table width="100%">
<tr>
<td align="left" width="25%" >
<asp:Label ID="lblwhom" runat="server" Text="<%$ Resources:LocalStrings,WhomToVisit %>"
CssClass="label"></asp:Label><br />
<asp:DropDownList ID="ddlwhomtovisit" runat="server" CssClass="longdropdown" AutoPostBack="True"
OnSelectedIndexChanged="rbtnwhomtovisit_SelectedIndexChanged" TabIndex="1" Width="98%">
<asp:ListItem Value="1"></asp:ListItem>
<asp:ListItem Value="2"></asp:ListItem>
<asp:ListItem Value="3"></asp:ListItem>
</asp:DropDownList>
</td>
解决方案
Resources:LocalStrings,AddVisitors %>"> </asp:Label></HeaderTemplate> <ContentTemplate> <table> <div class="newRadio"> <div style="float: left; padding: 15px 0 15px 15px;"> </div> </div> </table> <table width="100%"> <tr> <td align="left" width="25%" > <asp:Label ID="lblwhom" runat="server" Text="<%
Resources:LocalStrings,WhomToVisit %>" CssClass="label"></asp:Label><br /> <asp:DropDownList ID="ddlwhomtovisit" runat="server" CssClass="longdropdown" AutoPostBack="True" OnSelectedIndexChanged="rbtnwhomtovisit_SelectedIndexChanged" TabIndex="1" Width="98%"> <asp:ListItem Value="1"></asp:ListItem> <asp:ListItem Value="2"></asp:ListItem> <asp:ListItem Value="3"></asp:ListItem> </asp:DropDownList> </td>
Refer..
var tabContainer = window.Sys.Application.findComponent('<%=tabContainer.ClientID %>'); tabContainer .set_activeTabIndex(1);
这篇关于如何在页面加载中设置焦点在tabcontainer的tabpanel上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文