html5 结构新标签
<header>
<nav>
<section>
<aside>
<article>
<hgroup>
<p>
<dialog>
<footer>
input新增类型
<input type="email" name="email">
<input type="url" name="url"> //兼容性比较差,只针对iphone手机端
<input type="tel" name="tel">
<input type="date" name="date">
<input type="month" name="month">
<input type="week" name="week">
<input type="time" name="time">
<input type="datetime" name="datetime"> //ios10以后不再兼容
<input type="datetime-local" name="datetime-local">
以上电脑端没有太大作用,主要针对手机端
<input type="number" name="number">
<input type="range" name="range" min="1" max="100">
<input type="search" name="search">
<input type="color" name="color">
表单新增加属性
<form autocomplete="on"></form>
ps:autocomplete适用于标签,以及以下类型的标签:
text,search,url,telephone,email,password,datepickers,range,color
案例:
<form action="lesson2_1 autocomplete.html" autocomplete="on">
<input type="text" name="text">
<input type="email" name="email" autocomplete="off">
<input type="submit">
</form>
<input type="text" name="text" autofocus="autofocus">
案例:
<form action="lesson2_1 autocomplete.html" autocomplete="on">
<input type="text" name="text" autofocus="autofocus">
<input type="email" name="email" autocomplete="off">
<input type="submit">
</form>