新手问题:简单的表格不发布数据[重复]。

问题描述 投票:0回答:1

我的表单只给出了最喜欢的饮料数据,感谢任何帮助。 我想输出表单中给出的所有信息。

<form action="https://learn.nucamp.co/show_everything.php" method="post">
  <label for="name">Name</label>
  <input type="text" id="name" value="name" text="name" />

  <label for="rating">Your Rating:</label> 1 <input type="range" id="rating" value="rating" min="1" max="5" /> 5

  <label for="comments">Comments:</label>
  <input type="text" id="comments" value="comments" text="name" />

  <label>Choose your favorite drink:</label>
  <input type="checkbox" name="drink" value="coffee" /> Coffee
  <input type="checkbox" name="drink" value="Tea" /> Tea
  <input type="checkbox" name="drink" value="Juice" /> Juice

  <input type="submit" id="submit-btn" class="button" />
</form>
html forms
1个回答
0
投票

除了饮料复选框之外,其他所有的输入都缺少一个 "最喜欢的饮料"。name= 属性,所以没有提交。

© www.soinside.com 2019 - 2024. All rights reserved.