Bootstrap Submit Button不提交

时间:2017-04-20 17:38:06

标签: jquery html twitter-bootstrap css3

当按下Enter按钮时,

Bootstrap按钮不提交。我已经尝试了所有可能的东西并阅读了我发现的许多东西,却无法解决它。 单击时按钮工作,但按下Enter按钮时,它不发送提交按钮但提交其他输入字段

 <div class="panel panel-success">
<div class="panel-heading">
<h3 class="panel-title text-center"> Sign In to  School Hub </h3>
</div>
<div class="panel-body">

                        <?php
                        if (isset($_GET['recode'])) {
                            $Recode = urldecode($_GET['recode']);
                            if ($Recode == 2) {
                                ?>
                        <div class="alert alert-danger alert-dismissable">
<button type="button" class="close" data-dismiss="alert"  aria-hidden="true">&times; </button>
                                    Invalid Username and/or Password, Please  Try Again
                                </div>
                                <?php
                            } elseif ($Recode == 2) {
                                ?>
                  <div class="alert alert-danger alert-dismissable">
                                    <button type="button" class="close" 
    data-dismiss="alert" aria-hidden="true">&times;
    </button>
                            Unable to Complete SignUp, Please Try Again
                                </div>
                                <?php
                            }
                        }
                        ?>
                        <form method="post" action="Server/NewUser.php" 
 id="NewLogin">


                            <div class="col-md-12" style="margin-top: 10px">
                                <div class="form-group">
                                    <label class="control-label" for="Email">Email Address</label>
<input type="text" name="Email"  id="Email" class="form-control "/>
                                </div>

                            </div>


                            <div class="col-md-12" style="margin-top: 10px">
                                <div class="form-group">
                                    <label class="control-label" 
 for="Pswd">Password</label>
                                    <input type="password" name="Pswd" 
 id="Pswd" class="form-control "/>
                                </div>
                            </div>


                            <div class="col-md-12" style="margin-top: 20px">

                                <input type="checkbox" name="Keepme" 
 value="Keepme"> Keep Me SignIn


                            </div>

                            <div class="col-md-12" style="margin-top: 20px">
                                <div class="form-group">
                                    <input type="submit" class="btn btn-
success pull-right" name="SignIn"
                                           value="Sign In"/>
                                </div>
                            </div>

                            <div class="col-md-12" style="margin-top: 20px">
                                <p>Not Yet Registered, Click Here to <a 
 href="SignUp.php">Sign Up</a></p>
                            </div>

                        </form>
                    </div>
                </div>

请帮助审核 任何帮助都很受欢迎

1 个答案:

答案 0 :(得分:1)

你可以将onclick声明为Button,然后另一只手传递一个Javascript函数...搜索关于发送GET POST请求的JavaScript ...你很容易做到......:)