【问题标题】:input type="submit" doesn't show full text输入类型=“提交”不显示全文
【发布时间】:2020-09-14 07:26:35
【问题描述】:

我有一个元素列表 {{FieldName}}。

当我在输入中使用此列表时,它只显示第一个单词而不是所有文本?

我的代码

              {% for con2 in FieldName %}
    <table style="border-width: 2px; border: #333;"><tr>
    <input type="submit" value= {{con2.FidlAbr}}  name="FieldName" style="width:200px;"></tr></table>
    {% endfor %}</form>
          </div></div></div>

输出应该是这样的: , HMZ , TFT DEVO 100 , 蒂姆·斯纳格内 , TRNW

但它给了我这样的输出!!

BEQ , HMZ , 薄膜晶体管, 蒂姆, , TRNW

它有什么问题?

【问题讨论】:

    标签: html django forms input


    【解决方案1】:

    你需要在它周围加上撇号,就像其他属性一样,所以而不是

    <input type="submit" value= {{con2.FidlAbr}}  name="FieldName" ...
    

    你需要

    <input type="submit" value="{{con2.FidlAbr}}"  name="FieldName" ...
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2013-11-22
      • 2012-02-06
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-07-13
      • 1970-01-01
      相关资源
      最近更新 更多