找不到错误,但是“提交”按钮没有任何响应

时间:2019-07-22 17:25:17

标签: html forms submit

我有以下HTML表单。 “提交”按钮根本不起作用。我也尝试通过Jquery获得响应。 jQuery也不被标识为提交按钮。

<form name="add-student" id="add-student" runat="server" method="Post" enctype="multipart/form-data" action="../svr/add-stu-submit.php">
    <div class="panel panel-default">
        <div class="panel-heading">
            <b>Student Personal Details</b>
        </div>
        <div class="panel-body" style="padding-left: 10%">
            <br/>
            <div class="row">
                <div class="col-md-3"></div>
                <div class="col-md-8" id="error">heee;lll</div>
            </div>
            <div class="row">
                <div class="form-group">
                    <div class="col-md-5">
                        <br/>
                        <label class="btn-upload" style="text-align: center;">
                            <div id="display-img" align="center">
                                <img src=""id="image_preview"alt=""/>
                            </div>
                            <input type="file" name="uploadImage"id="uploadImage" required/>
                        </label>
                    </div>
                    <div class="col-md-5"></div>
                </div>
            </div>
            <div class="row">
                <div class="form-group">
                    <div class="col-md-5">
                        <label for="stu_index">Student Index:</label>
                        <div class="search-box">
                            <input type="text" class="form-control" id="stu_index" name="stu_index" style="height: 35px;" autocomplete="off" value="
                                <?php (isset($_POST['stu_index']) ? $_POST['stu_index'] : null); ?>" placeholder="Enter Student Index">
                                <div class="res"></div>
                            </div>
                            <span id="error_msg"></span>
                        </div>
                        <div class="col-md-5">
                            <label for="stu_nic">Identification Number :</label>
                            <input type="text" class="form-control" name="stu_nic" id="stu_nic"style="height: 35px;" autocomplete="off" placeholder="Identification Number">
                            </div>
                        </div>
                    </div>
                    <div class="row">
                        <div class="form-group">
                            <div class="col-md-5">
                                <label for="stu_full_name">Full Name of the Student :</label>
                                <input type="text" class="form-control" id="stu_full_name" name="stu_full_name" style="height: 35px;" autocomplete="off" placeholder="Enter Name in Full">
                                </div>
                                <div class="col-md-5">
                                    <label for="stu_gender">
                                                            Gender :
                                                        </label>
                                    <select name="stu_gender" id="stu_gender" class="form-control">
                                        <option value="Female" selected="selected">Female</option>
                                        <option value="Male">Male</option>
                                    </select>
                                </div>
                            </div>
                        </div>
                        <div class="row">
                            <div class="form-group">
                                <div class="col-md-5">
                                    <label for="stu_dob">Date of Birth :</label>
                                    <input type="text" class="form-control" id="stu_dob" name="stu_dob"style="height: 35px;" autocomplete="off" placeholder="Enter Date of Birth">
                                    </div>
                                    <div class="col-md-5">
                                        <label for="date_entered">Date Join  :</label>
                                        <input type="text" class="form-control" name="date_entered" id="date_entered"style="height: 35px;"autocomplete="off" placeholder="Enter Registered Date">
                                        </div>
                                    </div>
                                </div>
                                <div class="row">
                                    <div class="form-group">
                                        <div class="col-md-5">
                                            <label for="stu_race">
                                                            Race :
                                                        </label>
                                            <select name="race" id="race" class="form-control">
                                                <option value="Sinhala">Sinhala</option>
                                                <option value="Tamil">Tamil</option>
                                                <option value="Burger">Burger</option>
                                                <option value="Muslim">Muslim</option>
                                                <option value="Other">Other</option>
                                            </select>
                                        </div>
                                        <div class="col-md-5">
                                            <label for="religion">Religion :</label>
                                            <select name="religion" id="religion" class="form-control">
                                                <option value="Buddhism">Buddhism</option>
                                                <option value="Roman Cathelic">Roman Cathelic</option>
                                                <option value="Methodist">Methodist</option>
                                                <option value="Hindu">Hindu</option>
                                                <option value="Islam">Islam</option>
                                                <option value="Other">Other</option>
                                            </select>
                                        </div>
                                    </div>
                                </div>
                                <div class="row"></div>
                                <div id="error"></div>
                                <div class="row">
                                    <div class="form-group">
                                        <div class="col-md-5">
                                            <label for="txt-class">Current Class :</label>
                                            <select name="txt_class" class="form-control" id="txt_class">
                                                <?php
                                                            include ('../../svr/student/class-dropdown.php');
                                                            while ($row_1 = mysqli_fetch_array($result_1)) {
                                                                echo '
                                                <option value=' . $row_1['class_value'] . '>' . $row_1['class_name'] . '</option>';
                                                            }
                                                            ?>
                                            </select>
                                        </div>
                                        <div class="col-md-5">
                                            <label for="txt_sub_class">Current Sub-Class :</label>
                                            <select name="txt_sub_class" class="form-control" id="txt_sub_class">
                                                <?php
                                                            include ('../../svr/student/class-dropdown.php');
                                                            while ($row_2 = mysqli_fetch_array($result_2)) {
                                                                echo '
                                                <option value=' . $row_2['sub_class'] . '>' . $row_2['sub_class'] . '</option>';
                                                            }
                                                            ?>
                                            </select>
                                        </div>
                                    </div>
                                </div>
                                <div class="row">
                                    <div class="col-md-5">
                                        <label for="class-entered">Batch Number:</label>
                                        <input type="text" name="batch-number" id="batch-number" class="form-control" placeholder="Enter your Batch Number">
                                        </div>
                                        <div class="col-md-5">
                                            <label for="pre_school">Previous School</label>
                                            <input type="text" id="pre_school" name="pre_school" autocomplete="off" value="" class="form-control" style="height: 35px;" placeholder="Enter Your Previous School Name">
                                            </div>
                                        </div>
                                        <div class="row">
                                            <div class="form-group">
                                                <div class="col-md-5">
                                                    <label for="existing-mem">
                                                            Existing Member :
                                                        </label>
                                                    <select name="existing-mem" id="existing-mem" class="form-control">
                                                        <option value="no" selected="selected">No</option>
                                                        <option value="yes">Yes</option>
                                                    </select>
                                                </div>
                                                <div class="col-md-5">
                                                    <label for="existing-mem">
                                                            Family ID :
                                                        </label>
                                                    <input type="text" name="Family-id" id="Family-id" class="form-control" placeholder="Type your Family ID" disabled>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="panel-heading" id="contact-details-head">
                                            <b>Contact Details</b>
                                        </div>
                                        <div class="panel-body" id="contact-details-body"style="padding-left: 10%; ">
                                            <div class="row">
                                                <div class="form-group">
                                                    <div class="col-md-5">
                                                        <label for="stu_dob">Address Line 01 
                                                            <font color="red">*</font> :
                                                        </label>
                                                        <input type="text" class="form-control" id="add-01" name="add-01"style="height: 35px;" autocomplete="off" placeholder="Enter Address Line 01">
                                                        </div>
                                                        <div class="col-md-5">
                                                            <label for="date_entered">Address Line 02 
                                                                <font color="red">*</font>:
                                                            </label>
                                                            <input type="text" class="form-control" name="add-02" id="add-02"style="height: 35px;"autocomplete="off" placeholder="Enter Address Line 02">
                                                            </div>
                                                        </div>
                                                    </div>
                                                    <div class="row">
                                                        <div class="form-group">
                                                            <div class="col-md-5">
                                                                <label for="stu_dob">Address Line 03 
                                                                    <font color="red">*</font> :
                                                                </label>
                                                                <input type="text" class="form-control" id="add-03" name="add-03"style="height: 35px;" autocomplete="off" placeholder="Enter Address Line 03">
                                                                </div>
                                                                <div class="col-md-5">
                                                                    <label for="date_entered">Contact Number 
                                                                        <font color="red">*</font>:
                                                                    </label>
                                                                    <input type="text" class="form-control" name="contact" id="contact"style="height: 35px;"autocomplete="off" placeholder="Enter Contact Number">
                                                                    </div>
                                                                </div>
                                                            </div>
                                                        </div>
                                                        <div class="panel-heading" id="parent-details-head" style="">
                                                            <b>Parent's Details</b>
                                                        </div>
                                                        <div class="panel-body" id="parent-details-body" style="padding-left: 10%;">
                                                            <div class="row">
                                                                <div class="form-group">
                                                                    <div class="col-md-5">
                                                                        <label for="stu_dob">Mother's Name :</label>
                                                                        <input type="text" class="form-control" id="mom-name" name="mom-name"style="height: 35px;" autocomplete="off" placeholder="Enter Mother's Name">
                                                                        </div>
                                                                        <div class="col-md-5">
                                                                            <label for="date_entered">Contact Number :</label>
                                                                            <input type="text" class="form-control" name="mom-contact" id="mom-contact"style="height: 35px;"autocomplete="off" placeholder="Enter Mother's Contact Number">
                                                                            </div>
                                                                        </div>
                                                                    </div>
                                                                    <div class="row">
                                                                        <div class="form-group">
                                                                            <div class="col-md-5">
                                                                                <label for="stu_dob">Farther's Name :</label>
                                                                                <input type="text" class="form-control" id="far-name" name="far-name"style="height: 35px;" autocomplete="off" placeholder="Enter Mother's Name">
                                                                                </div>
                                                                                <div class="col-md-5">
                                                                                    <label for="date_entered">Contact Number :</label>
                                                                                    <input type="text" class="form-control" name="far-contact" id="far-contact"style="height: 35px;"autocomplete="off" placeholder="Enter Farther's Contact Number">
                                                                                    </div>
                                                                                </div>
                                                                                <!--end of form-group-->
                                                                            </div>
                                                                            <!--end of Row-->
                                                                            <br/>
                                                                        </div>
                                                                        <!--end of panel-body class-->
                                                                    </div>
                                                                    <!--end of panel-default-class-->
                                                                    <div class="row">
                                                                        <div class="col-md-4"></div>
                                                                        <div class="col-md-4">
                                                                            <input type="submit" name="btn-add-stu" id="btn-submit" class="form-control btn-success" value="Insert ">
                                                                            </div>
                                                                        </div>
                                                                    </form>
                                                                    <!--end of form-->

我希望此提交按钮能够正常工作。特别是我找不到任何依赖关系,并且我已经开发出许多形式。请帮助我解决此问题。

0 个答案:

没有答案