HTML网页中HTML5表单新添加的功能
作者:互联网
<form> @*html5确实牛,有一个基本的自检功能*@ <label>邮箱地址:</label> <input type="email" required="required" /> @*输入的类型为数字,最大值为0,最小值为100,只能是0,5,10,这里就不需要required*@ <br /> <label>年龄:</label> <input type="number" min="0" max="100" step="5" /> <br /> <input type="range" min="0" max="100" required="required" /> <br /> <label>站内搜索</label> <input type="search" placeholder="搜索" required="required" /> <br /> <label>请收入网址</label> <input type="url" placeholder="http://" required="required" /> <br /> <label>日期</label> <input type="date" required="required" /> <br /> <label>月</label> <input type="month" required="required" /> <br /> <label>星期</label> <input type="week" required="required" /> <br /> <label>时间</label> <input type="time" required="required" /> <br /> <label>当地时间</label> <input type="datetime-local" required="required" /> <br /> <input type="submit" value="提交" /> </form>
<form> @*html5确实牛,有一个基本的自检功能*@ <label>邮箱地址:</label> <input type="email" required="required" /> @*输入的类型为数字,最大值为0,最小值为100,只能是0,5,10,这里就不需要required*@ <br /> <label>年龄:</label> <input type="number" min="0" max="100" step="5" /> <br /> <input type="range" min="0" max="100" required="required" /> <br /> <label>站内搜索</label> <input type="search" placeholder="搜索" required="required" /> <br /> <label>请收入网址</label> <input type="url" placeholder="http://" required="required" /> <br /> <label>日期</label>
<input type="date" required="required" /> <br /> <label>月</label> <input type="month" required="required" /> <br /> <label>星期</label> <input type="week" required="required" /> <br /> <label>时间</label> <input type="time" required="required" /> <br /> <label>当地时间</label> <input type="datetime-local" required="required" /> <br />
<input type="submit" value="提交" /> </form>
标签:10,站内搜索,邮箱地址,required,表单,HTML,HTML5,100,html5 来源: https://www.cnblogs.com/gakkiaspnet/p/14048534.html