HTML 表单元素

本页内容
上一节: HTML_Form属性 下一节: HTML_表单Input类型

HTML <form> 元素可以包含以下一个或多个表单元素:

  • <input>
  • <label>
  • <select>
  • <textarea>
  • <button>
  • <fieldset>
  • <legend>
  • <datalist>
  • <output>
  • <option>
  • <optgroup>

<input> 元素

最常用的表单元素之一是 <input> 元素。

元素可以通过 <input> 多种方式显示,具体取决于 type 属性。


示例

<form action="/third/http.php" method="GET">
  <label for="fname">名字:</label>
<input type="text" id="fname" name="fname"> 
</form>
上一节: HTML_Form属性 下一节: HTML_表单Input类型
此页面最后编辑于2022年8月14日 (星期日) 21:27。