0

所以我在 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>
4

1 回答 1

2

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

于 2013-10-05T21:26:11.503 回答