模态形式不起作用

时间:2013-10-05 21:22:26

标签: php forms twitter-bootstrap post

所以我在Bootstrap的模态中有这个代码,这个代码用于运行名为'changepassword.php'的PHP脚本。 PHP脚本存在,但是当我按下“保存按钮”按钮时,它不会运行脚本?有什么想法吗?

<div class="modal-header">
    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
    <h4 class="modal-title">Username <span class="label label-default">Change password</span></h4>
</div>
<form id="passwordchange" name="cp" method="post" action="scripts/changepassword.php">
    <div class="modal-body">
        <input type="password" name="vpass" placeholder="Password" class="form-control">
        <input type="password" name="vnpass" placeholder="Password" class="form-control">
        <input type="password" name="vcnpass" placeholder="Password" class="form-control">
    </div>
    <div class="modal-footer">
        <button type="button" data-dismiss="modal" class="btn">Cancel</button>
        <button type="button" id="passwordchange-b" name="sumbit" type="submit" class="btn btn-primary">Save password</button>
    </div>
</form>

1 个答案:

答案 0 :(得分:2)

提交按钮需要删除重复的类型属性(type =“button”)。