我正在尝试获取从我的搜索页面插入的所有值,并将其提供给我正在构建的烧瓶应用程序。尽管我网页中的所有按钮和功能都像 .add、.remove、.main_search 一样工作,但提交按钮不会执行任何操作。这是代码的基础:{% 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 以构建带连词的查询,然后将所有表单数据提供给 sqlalchemy db 以进行高效查询。
添加回答
举报
0/150
提交
取消