“HTML 表单元素”的版本间差异

本页内容
上一节: HTML_Form属性 下一节: HTML_表单Input类型
(创建页面,内容为“HTML''' <nowiki><form></nowiki> '''元素可以包含以下一个或多个表单元素: * ''' <nowiki><input></nowiki> ''' * ''' <nowiki><label></nowiki> ''' * ''' <nowiki><select></nowiki> ''' * ''' <nowiki><textarea></nowiki> ''' * ''' <nowiki><button></nowiki> ''' * ''' <nowiki><fieldset></nowiki> ''' * ''' <nowiki><legend></nowiki> ''' * ''' <nowiki><datalist></nowiki> ''' * ''' <nowiki><output></nowiki> ''' * ''' <nowiki><option></nowiki> ''' * ''' <now…”)
 
Neo讨论 | 贡献
第19行: 第19行:


<sample title="" hererun="s1" desc="" >
<sample title="" hererun="s1" desc="" >
 
<form action="/third/http.php" method="GET">
   <label for="fname">名字:</label>
   <label for="fname">名字:</label>
<input type="text" id="fname" name="fname">  
<input type="text" id="fname" name="fname">  
</form>
</sample>
</sample>

2022年8月14日 (日) 21:27的版本

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。