我正在嘗試獲取從我的搜索頁面插入的所有值,并將其提供給我正在構(gòu)建的燒瓶應(yīng)用程序。盡管我網(wǎng)頁中的所有按鈕和功能都像 .add、.remove、.main_search 一樣工作,但提交按鈕不會執(zhí)行任何操作。這是代碼的基礎(chǔ):{% extends "layout.html" %}{% block content %} <head> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.0/jquery.min.js"></script> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" /> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script> </head> <body> <br /> <div class="container"> <h4 align="center">Select Main Category</h4> <br /><!-- id="contact-form"--> <form method="POST" id="insert_form" action="/search2"> <div class="about-center section-center"> <div class="btn-container"> <div class="col-sm-5"> <button class="btn btn-info main_search" name="main_search" id = "s_r" data-id="s_r">S_R</button> <button class="btn btn-info main_search" name="main_search" id = "c_h" data-id="c_h">C_H</button> </div> </div> </div> <div class="table-repsonsive"> <table class="table table-bordered" id="item_table"> <thead> <tr> <th>Category</th> <th>Conjunction</th> <th>Enter Item Name</th> <th><button type="button" name="add" class="btn btn-success btn-xs add"><span class="glyphicon glyphicon-plus"></span></button></th> </tr> </thead> <tbody></tbody> </table> <div align="center"><!-- <button class="btn btn-info" id="contact-form-button" type="submit">submit</button>--> <input type="submit" name="submit_all_form" id="contact-form-button" class="btn btn-info submit" value="Insert" /> </div> <span id="error"></span> </div> </form> </div>我正在嘗試使用添加按鈕將輸入框添加到 html 以構(gòu)建帶連詞的查詢,然后將所有表單數(shù)據(jù)提供給 sqlalchemy db 以進(jìn)行高效查詢。
提交按鈕在基于 jquery ajax 的網(wǎng)頁上不起作用
犯罪嫌疑人X
2023-04-27 15:19:40