简体   繁体   中英

How to get dropdown selected value in app.py in python flask?

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM