1. 程式人生 > >HTML——form表單中常用標簽總結

HTML——form表單中常用標簽總結

radio led ext only pin sta word htm and

 1 <form action="" method="get">
 2             <!--
 3                 placeholder="請輸入文本" 顯示提示
 4                 randonly="randonly"不能重新寫
 5                 disabled="disabled" 禁用 變灰色
 6             -->
 7             <input type="text" name="user_name" placeholder="請輸入文本" value="文本框"
readonly="readonly"disabled="disabled"/> 8 <!-- 9 隱藏框 10 Type="hidden"隱藏起來 11 --> 12 <input type="hidden" name="id" value="20160800612" /> 13 <!-- 14 密碼框 15 type="password"密碼不顯示 16 --> 17 <
input type="password" name="password" value="123456" disabled="disabled"/> 18 19 <!-- 20 testarea 設置寬度用cols 設置長度用rows 21 --> 22 <br /> 23 <textarea name="text" rows="5" cols="5"></textarea> 24 <!--多選框 25 <select>
26 <option></option> 27 <option></option> 28 ... 29 </select> 30 selected="selected"默認選擇項 31 32 --> 33 <select name="grade"> 34 <option value="1">一年級</option> 35 <option value="2" selected="selected">二年級</option> 36 <option value="3">三年級</option> 37 </select><br /> 38 <!-- 39 id="male"/><label for="male">男</label>點擊男也會選擇 40 41 --> 42 <input type="radio" value="0" name="gender" id="male"/><label for="male"></label> 43 <input type="radio" value="1" name="gender" id="female"/><label for="female"></label><br /> 44 45 <!-- 46 type="file"獲取文件 47 multiple="multiple"可以獲取多個文件 48 --> 49 <input type="file" name="fileget" multiple="multiple"/> 50 <!-- 51 type="checkbox"多選框 52 checked="checked"默認為選擇 53 --> 54 &nbsp; 55 <input type="checkbox"name="hobby" value="1" id="basketball" checked="checked"/><label for="basketball">籃球</label> 56 <input type="checkbox" name="hobby" value="2" id="football"><label for="football">足球</label> 57 <input type="checkbox"name="hobby" value="3" id="pingpong" /><label for="pingpong">乒乓球</label> 58 <br /> 59 60 <!-- 61 type="reset"重置所做的操作 62 --> 63 <input type="reset" value="重置" /> 64 <input type="submit" value="提交" /> 65 </form>

HTML——form表單中常用標簽總結