如何在jquery中使用按钮ID禁用按钮上的标签? 在以下PHP页面中,li标签中声明了四个选项卡,我使用bootstarp创建。
<form class="form span11">
<div class="tabbable" id="tab">
<div class="">
<ul class="nav nav-tabs">
<li class="active"><a href="#comments" data-toggle="tab">Comments</a></li>
<li class=""><a href="#" data-toggle="tab">Activities</a></li>
<li class=""><a href="#locations" data-toggle="tab">Locations</a></li>
<li class=""><a href="#pohistory" data-toggle="tab">PO History</a></li>
</ul>
</div>
<div class="tab-content">
<div class="tab-pane active" id="comments">
<?php include "views/projects/comments.php"; ?>
</div>
<div class="tab-pane " id="locations">
<?php include "partners_locations.php"; ?>
</div>
<div class="tab-pane " id="pohistory">
<?php include "pohistory.php"; ?>
</div>
</div>
</div>
<button id="set" type="button">submit</button>
</form>
答案 0 :(得分:0)
$("#set").click(function () {
$( "#tab" ).tabs({ disabled: true });
});