標籤:
<!DOCTYPE html><html> <head> <meta name="generator" content="HTML Tidy for HTML5 (experimental) for Windows https://github.com/w3c/tidy-html5/tree/c63cc39" /> <meta charset="utf-8" /> <title>表單</title> </head> <body> <h1>會員註冊</h1> <!--action轉到哪個頁面--> <form action="https://www.baidu.com/" name="form1" target="_blank"> <!--disabled不可用--> 不可用 <input type="text" value="admin" disabled="disabled" /> <br />唯讀: <input type="text" value="admin" readonly="readonly" /> <br /> <!-- 文字框和密碼框:value是屬性預設值--> 姓名: <input name="username" type="text" value="admin" size="20" /> <br />密碼: <input name="password" type="pswd" value="123" size="20" /> <br /> <!--檔案上傳--> 頭像: <input type="file" /> <br /> <input type="button" value="確定" /> <br /> <!--性別單選,name值相同--> <!--input 值"checked"是預設選擇--> 性別: <input type="radio" name="sex" checked="checked" />男 <input type="radio" name="sex" />女 <br />語言: <!--點擊radio單選後面的文字也能選擇的方法input id="id" ,label for=“id”--> <input type="radio" id="chinese" name="language" checked="checked" /> <label for="chinese">漢語</label> <input type="radio" id="english" name="language" /> <label for="english">英語</label> <br />愛好: <br /> <input type="checkbox" />籃球 <input type="checkbox" />足球 <input type="checkbox" />乒乓球 <input type="checkbox" />跳繩 <br /> <br /> <br />選擇您的學曆: <!--select下的屬性multiple是多選 option為disabled值時不能選--> <select name="education" multiple="mulpitle" > <optgroup label="學曆"> <option value="master">研究生</option> <!--預設為本科 option後面加上selected="selected"--> <option value="university" selected="selected">本科</option> <option value="institution">專科</option> <option value="high-scool" disabled="disabled">高中</option></optgroup> </select> <br />個人說明: <br /> <!--cols是長度,rows是高度,也就是行數--> <textarea value="" cols="40" rows="5"> <!--雙標籤預設值寫到兩個標籤之間-->...</textarea> <br /> <input type="submit" value="確認提交" /> <input type="reset" value="重設" /> <br /></form> </body></html>
html表單應用