Python 學習 Day18 HTML5新增
阿新 • • 發佈:2021-02-14
技術標籤:前端
HTML5新增
- (1)email標籤
- (2)URL標籤
- (3)color標籤
- (4)number標籤
- (5)range標籤
- (6)date,month,week標籤
<body>
<form action="" method="get">
<!--email
html5的型別可以增加校驗
-->
<input type="email" name="email" />
<!--URL-->
<input type= "url" />
<!--color-->
<input type="color" />
<!--number
min:最小值
max:最大值
step:步長
value:預設值,一定在步長的範圍中,否則不能提交
-->
<input type="number" min="1" max="34" step="3" value="4" />
< !--range-->
1<input type="range" min="0" max="10" name="range" step="3" />10
<!--date-->
<input type="date" />
<!--month-->
<input type="month" />
<!--week-->
<input type="week" />
- HTML5新增屬性:
multiple:多選
placeholder:預設提示
autofocus:自動獲取焦點(游標位置)
required:必填項
<input type="text" autofocus="autofocus" />
<input type="text" required="required" />