“HTML 表单元素”的版本间差异
本页内容
(创建页面,内容为“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…”) |
(→元素) |
||
第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>