<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>