我的 users.php 文件是:
<?php if(isset($_POST['attrname'])){
//insert some stuff to the sql base
} ?>
<ul id="tabs" class="nav nav-tabs" data-tabs="tabs">
<li class="active"><a href="#usertablediv" data-toggle="tab">Users</a></li>
<li><a href="#attrdiv" data-toggle="tab">Attributes</a></li>
</ul>
<div id="users_attributes" class="tab-content">
<div class="tab-pane active" id="usertablediv">
<table>some stuff about users</table></div>
<div class="tab-pane" id="attrdiv">
<table>some stuff about attributes of users </table>
</div>
</div>
<form method='post' action='users.php'>
<input type="text" name="attrname" id='attrname'>
<button class='btn btn-primary'type='submit'>Save</button>
</form>
当我单击“保存”按钮时,我希望重新加载 users.php 并激活这次激活的 Attributes 选项卡。我怎样才能做到这一点?