0
中不起作用我在我的网页上有两个选项卡:付款和语句。 我使用以下代码在我重新加载相同页面时自动切换到选定选项卡。重新加载所选标签在IE
$('#advancedSearchTabs a').click(function(e) {
e.preventDefault();
$(this).tab('show');
});
// store the currently selected tab
$("ul.nav-tabs > li > a").on("shown.bs.tab", function(e) {
var id = $(e.target).attr("href").substr(1);
window.location.hash = id;
});
// on load of the page, switch to the currently selected tab
var hash = window.location.hash;
$('#advancedSearchTabs a[href="' + hash + '"]').tab('show');
这个工作在每一个浏览器,除了IE 11.我总是跳回到第一个标签。我怎样才能使这项工作在Internet Explorer中
我加入你的额外的代码行,但没有奏效。 – Lumpi
如果在新行之后使用'console.log(target)',控制台中有什么? – alexP
Statements – Lumpi