直接拷贝本人代码即可 注意在同级目录下引用 相应的js 和 css。
能实现tab效果 关键看bootstrap的 data-toggle= tab
<script src="jquery-1.11.1.min.js"></script>
<script src="bootstrap.min.js"></script>
<script><br> <br> $(document).ready(function() {<br> if(location.hash) {<br> $('a[href=' + location.hash + ']').tab('show');<br> }<br> $(document.body).on("click", "a[data-toggle]", function(event) {<br> location.hash = this.getAttribute("href");<br> });<br> });<br> $(window).on('popstate', function() {<br> var anchor = location.hash || $("a[data-toggle=tab]").first().attr("href");<br> $('a[href=' + anchor + ']').tab('show');<br> });<br> </script>











