I have a dropdown list in abc.html in python flask templates. how to get dropdown selected value in app.py, on the dropdown select event.
@app.route("/")def abc(): return render_template('abc.html')
You would use Javascript to invoke an AJAX request back to the API server with some data containing that information.
In other words, there's a logical separation between the displayed HTML (front-end) and the Python code (backend). The only ways to communicate between them is by websockets or HTTP traffic
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.