繁体   English   中英

Flask - 将 Javascript 变量发送到 Python

[英]Flask - Send Javascript Variable to Python

I'm looking for a simple Flask example that demonstrates pressing a button in an HTML page that sends a Javascript string variable to Flask in Python and then prints that string to the terminal where the app is running.

Flask RESTful API。 这并不像你想象的那么容易。 您必须为此设置基本的 Flask RESTful API 并从 JS 代码发出 post 请求,将变量作为参数传递。 对于 Flask 方面,你会很好地使用这个Flask RESTful 文档对于前端,你想使用类似 Axios 或类似的东西

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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