#### 1.带验证,带历史记录的表单;
~~~
<form action="#" method="post">
<input type="text" name="Name" value="姓 名"
onfocus="this.value = '';" onblur="if (this.value == '') {this.value = '姓 名';}">
<input type="email" name="Email" value="邮 箱" onfocus="this.value = '';" onblur="if (this.value == '') {this.value = '邮 箱';}" required="">
<input type="text" name="Mobile number" value="电话号码" onfocus="this.value = '';" onblur="if (this.value == '') {this.value = '电话号码';}" required="">
<textarea name="Message..." onfocus="this.value = '';" onblur="if (this.value == '') {this.value = '内 容...';}" required>内 容...</textarea>
<input type="submit" value="提 交">
</form>
~~~
说明:
1.有name属性才能被服务器记录你所输入的记录
2.onfocus:当元素获得焦点是触发的事件
3.onblur:当元素失去焦点时触发的事件
4.required:验证输入的信息是否正确