2015-02-11 64 views
0

我用選項卡內容更改成功創建了一個下拉列表。但問題是,在我選擇下拉菜單中的值來更改標籤內容之後 - 比方說從wan_static_ipwan_dynamic_ip,我不能再次切換回wan_static_ip帶有製表符窗格的引導程序下拉列表

的另一個問題是,當已經選擇的值其將永久選擇並且不能從再次

<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/js/bootstrap.min.js"></script> 
 
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css" rel="stylesheet"/> 
 

 
<div class="borders col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main"> 
 
    <div class="dropdown"> 
 
    <button class="btn btn-default dropdown-toggle" type="button" data-toggle="dropdown" aria-expanded="true"> 
 
     Dropdown 
 
     <span class="caret"></span> 
 
    </button> 
 
    <ul class="dropdown-menu" role="menu"> 
 
     <li role="presentation"><a href="#wan_static_ip" data-toggle="tab">Static IP</a> 
 
     </li> 
 
     <li role="presentation"><a href="#wan_dynamic_ip" data-toggle="tab">Dynamic IP</a> 
 
     </li> 
 
     <li role="presentation"><a href="#wan_pppoe" data-toggle="tab">PPPoE</a> 
 
     </li> 
 

 
    </ul> 
 

 
    </div> 
 

 
    <div class="tab-content"> 
 
    <div class="tab-pane fade in active" id="wan_static_ip">1</div> 
 
    <div class="tab-pane fade" id="wan_dynamic_ip">2</div> 
 
    <div class="tab-pane fade" id="wan_pppoe">3</div> 
 
    </div> 
 

 
</div>

+0

您使用的是什麼版本的引導程序? – 2015-02-11 03:30:23

+0

我使用最新引導v3.3.2 – cheater29 2015-02-11 04:05:31

回答

0

標籤下拉按鈕的示例代碼點擊getbootstrap.com

<ul class="nav nav-tabs"> 
    <li class="dropdown" role="presentation"> 
     <a aria-expanded="false" role="button" href="#" data-toggle="dropdown" class="dropdown-toggle"> 
       Dropdown <span class="caret"></span> 
     </a> 
     <ul role="menu" class="dropdown-menu"> 
       <li><a href="#">Action</a></li> 
       <li><a href="#">Another action</a></li> 
       <li><a href="#">Something else here</a></li> 
       <li class="divider"></li> 
       <li><a href="#">Separated link</a></li> 
     </ul> 
    </li> 
</ul> 
+0

提供代碼是好的,但添加一些解釋到您的文章,這將有助於其他用戶 – Rugmangathan 2015-02-11 04:58:09