zoukankan      html  css  js  c++  java
  • 设置html属性为disabled时flask后台获取数据失败

    标签input的值如果不需要用户修改,则设置属性为 readonly,不要设置为 disabled。因为设置disabled会导致flask后端获取不到这个input得value

    rule_maker = request.form.get('rule_maker').strip()
    <form class="form-horizontal form-bordered form-row-stripped" id = "rule_form" method="post">
    <div class="control-group">

    <label class="control-label">规则发布者</label>

    <div class="controls">

    <input type="text" name="rule_maker" placeholder="规则发布者" class="m-wrap span12" value="{{ session['user'] }}" readonly/>

    <span class="help-inline"><em style="color: red">规则发布者负责规则的维护和解释,平台只负责功能。</em></span>

    </div>

    </div>
    </form>

    参考:https://blog.csdn.net/im_Iterator/article/details/80592237

  • 相关阅读:
    python
    python
    python
    python
    python
    python-接口自动化 token 的处理
    如何顺利度过试用期?
    印象深刻-bug汇总
    go 实现1000以内的数字,输入35 输出三十五
    jenkins 汉化
  • 原文地址:https://www.cnblogs.com/shengulong/p/9521596.html
Copyright © 2011-2022 走看看