您可以直接复制代码 注意在同级别文件夹中引用 相应js 和 css。
实现tab影响 关键看bootstrap的 data-toggle= tab
$(document).ready(function() {
if(location.hash) {
$('a[href=' + location.hash + ']').tab('show');
}
$(document.body).on("click", "a[data-toggle]", function(event) {
location.hash = this.getAttribute("href");
});
});
$(window).on('popstate', function() {
var anchor = location.hash || $("a[data-toggle=tab]").first().attr("href");
$('a[href=' + anchor + ']').tab('show');
});
HomeProfileMessagesSettingshomeprofilemessagessettings