设置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