django - 无法在 Django 表单中访问 Div 中的字段
问题描述
什么工作正常
<form action = "{% url 'dashboard'%}" method = "POST">
{% csrf_token %}
<label for="your_name">Your name: </label>
<input id="your_name" type="text" name="your_name">
<input type="submit" value="OK">
</form>
什么不起作用...
<form action = "{% url 'dashboard'%}" method = "POST">
{% csrf_token %}
<div class="col-lg-3 col-md-3 col-sm-12 p-0">
<input type="text" id="cve" class="form-control search-slt" placeholder="Enter CVE">
<input type="submit" value="OK">
</div>
</form>
每当我在DIV
标签内有值时,在 a 内form
,POST
请求不包含 DIV 字段的值。
解决方案
推荐阅读
- linux - SYS_READ 调用只工作一次,再次运行时似乎会跳过代码
- c++ - 如果你在向量副本中放一个常数怎么办?或移动?
- sql - 如何选择 hasMany 关系作为列名
- api - NoSuchMethodError : 在 null 上调用了 Setter "movies="
- api - WIX API 提取到中继器
- amazon-web-services - 如何通过提供“ARN”而不是秘密访问密钥和访问密钥 ID 在 AWS 上设置 Chef InSpec?
- java - 咖啡因:Memoize 或 Cache Builder 一个大项目列表?
- java - Spring Batch - 使用 JdbcCursorItemReader 进行 Bean 继承
- xml - 如何为具有多行的 XML 元素获取/使用分组
- python - 如何将浮点数写入串口