表單後端
<input>是行內塊級元素,能設置寬和高;網站
(<form action=」」>)ui
單行文本框:<input type=」text」 value=」默認值」 name=」」>spa
密碼框:<input type=」password」 value=」默認值」>orm
下拉列表:<select> <option></option></select>ci
單選按鈕:<input type=」radio」 name=」一組屬性要一致」 checked>input
複合按鈕:<input type=」checkbox」 name=」一組屬性要一致」 checked>it
按鈕:<input type=」submit」 value=」」>io
(submit)提交按鈕/重置(reset)按鈕/普通(button)按鈕)form
多行文本框:<textarea></textarea>
<input type=」date」 >//日期
<input type=」range」>//範圍
<input type=」email」>//郵箱
<input type=」number」>//
阿里大於網站(電話發短信驗證碼:)
獲取焦點:<label for=」想要點擊用戶名獲取表單的焦點id」>用戶名:</label>
Input去掉焦點樣式:outline:none;
文本縮進:text-indent:2px;
字與字之間的間隔:Letter-spacing;
必填:required;
每個name的內容提交給後端
placeholder:文本框內的提示內容;
<fieldset>//可設置寬度和高度
<legend>選中下面的項試試</legend>
</fieldset>給表單加外邊框