Html input 標籤html
<html> <body> <!-- type="text" 普通文本輸入框 --> <input type="text" /> <!-- type="password" 密碼輸入框 --> <input type="password" /> <!-- type="email" 郵件輸入框 --> <input type="email" /> <!-- type="number" 數字選擇輸入框 --> <input type="number" /> <!-- type="color" 顏色選擇輸入框 --> <input type="color" /> <!-- type="time" 時間選擇輸入框 --> <input type="time" /> <!-- type="tel" 移動端輸入框,自動彈出鍵盤界面 --> <input type="tel" /> <!-- type="button" 按鈕框默認無功能、value="登陸"按鈕框內值 --> <input type="button" value="登陸"/> <!-- type="submit" 提交按鈕框可返回輸入框數據、value="登陸"按鈕框內值 --> <input type="submit" value="登陸"/> <!-- type="radio" 單選框、name="xxx"指定key值 相同key值會互斥不能多選、value="1"返回提交的value判斷值得不一樣 --> <input type="radio" name="xxx" value="1" /> <input type="radio" name="xxx" value="2"/> <!-- type="checkbox" 複選框、name="xxx"指定key值相同key值分類、value="1"返回提交的value判斷值得不一樣、checked="checked"默認勾選--> <input type="checkbox" name="xxx" value="1"/> <input type="checkbox" name="xxx" value="2"/> <input type="checkbox" name="xxx" value="3" checked="checked"/> <!-- type="reset" 清空表單內的內容、value="重置"輸入框內容--> <input type="reset" value="重置"> </body> </html>
<!--name=key --> <!-- value="內部默認輸入內容" --> <input type="text" name="key" value="xxx"/>
效果spa