flask - Get Data from non-input element in Flask
问题描述
This is my Bootstrap button which works as dropdown.
<button class="btn btn-outline-danger dropdown-toggle categoryButton" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Category</button>
I am using, flask to get the value . As it so stands, I want to get the value of the button, as it changes dynamically as I select differenet options from drop down list. The values I select on drop down is reflected on the button, and now I want to grab it on Flask. But I could not find any way to get value of the button from Flask. I tried giving name attribute to the button and did this on Flask
category = request.form.get('category')
But it returns none.Any help regarding this issue? Or should I go for another approach? Any help ?
解决方案
推荐阅读
- reactjs - ts(2322) 类型“内在属性和道具”上不存在属性子项
- javascript - 如何从 Angular 中的 Any 类型获取密钥?
- office-js - 如何创建无 UI 的自定义函数 Excel 加载项?
- javascript - 移动菜单切换按钮不关闭
- angular - Angular RXJS 6:过滤与对象键匹配的项目的可观察数组
- html - CSS 缺少 EC2 实例中的某些部分,但在 localhost 中工作正常。我该如何解决?
- python - pygame窗口不会关闭
- java - OpenAPI3 通过 Spring Boot 显示基于基本身份验证的方法
- ios - 没有fastlane的天蓝色devops服务连接到苹果
- ios - 字符串插值或连接似乎不起作用(swift)