对应的页面:template/setting.html
核心代码:
<form action="" method="post" class="form-horizontal form" enctype="multipart/form-data" id="form1"> <input type="text" name="my_name" class="form-control" value="{$settings['my_name']}" /> <input name="submit" type="submit" value="提交" class="btn btn-primary span3"> <input type="hidden" name="token" value="{$_W['token']}" /> </form> <script type="text/javascript"> $(function () { $('#myTab a').click(function (e) { e.preventDefault();//阻止a链接的跳转行为 $(this).tab('show');//显示当前选中的链接及关联的content }) }); </script>