我有与此处描述的完全相同的问题:
http://bugs.jqueryui.com/ticket/7930.问题是维护者无法重现它,因此票证已关闭.我的代码如下:
<script type="text/javascript"> $(document).ready(function () { // assigns the value of a GET parameter called tab to tabIndex var tabIndex = getUrlVars()['tab']; if (isNaN(tabIndex)) { tabIndex = 0; } // initializes tabs and selects the one provided in tabIndex (default: 0) $('div#tabs').tabs({ ajaxOptions: { cache: false},selected: tabIndex }); }); </script> <div id="tabs"> <ul> <li>@Html.ActionLink("User roles","Roles","Admin",New With {.rand = DateTime.Now.Ticks},Nothing)</li> <li>@Html.ActionLink("Report templates","Reports",Nothing)</li> <li>@Html.ActionLink("Blabla","2","Admin")</li> <li>@Html.ActionLink("Blabla2","3","Admin")</li> </ul> </div>
这将使用id创建标签:#ui-tabs-1,#ui-tabs-2,#ui-tabs-3,#ui-tabs-4.我通过url:http://server/Admin?tab=1访问该页面.选择了相应的选项卡(第二个带有报告),但是对前一个选项卡(用户角色)的href进行了ajax调用.它会导致显示空标签内容.你知道怎么解决吗?