有a 设置data-toggle=tab href=对应的#id
或者用js的方式
$(function){//表示文档加载完 $(.class a).click(function(){ $(this).tab("show"); }) }