代码之家  ›  专栏  ›  技术社区  ›  XCS

<textarea>之后的数据不显示

  •  1
  • XCS  · 技术社区  · 14 年前

    如果你在这里: http://xcs.dyndns.info/piataterenuri/vinde.php 您可以看到页脚出现。

    但如果你走了 http://xcs.dyndns.info/piataterenuri/vinde2.php 在这里,您可以看到文本区域后面没有显示任何内容。

    两者之间的唯一区别是,第二个具有:

    <tr>
    <td class="optiune">Info:</td>
    <td> <textarea cols="30" rows="5" class="field"/></td>
    </tr>
    

    3 回复  |  直到 14 年前
        1
  •  5
  •   rfunduk    14 年前

    textarea 标记不是自动关闭的(在HTML中)。所以你的代码应该是:

    <tr>
      <td class="optiune">Info:</td>
      <td>
        <textarea cols="30" rows="5" class="field"></textarea>
      </td>
    </tr>
    
        2
  •  1
  •   corroded    14 年前

    textarea需要结束标记

    <textarea cols="30" rows="50" class="field">
      PEW PEW PEW
    </textarea>
    
        3
  •  1
  •   Stefanvds    14 年前

    应该是

    <textarea cols="30" rows="5" class="field"></textarea>
    

    它不是自动关闭的 <input />