实现日历效果
<input type="date" name="bday">
<input type="datetime-local" name="bdaytime">
常用的表单的一些属性总结
type属性值 | 描述 |
---|---|
button | 定义可点击按钮 |
checkbox | 复选框 |
radio | 单选按钮 |
file | 定义输入字段和“浏览”按钮,供文件上传 |
image | 定义图像形式的 按钮 |
password | 密码字段,以星号或点掩饰 |
reset | 定义重置按钮,会清除表单中所有数据 |
submit | 定义提交按钮,把表单数据发送到服务器 |
text | 定义单行的输入字段,用户可在其中输入文本,默认宽度20个字符 |
color | 吸色器 |
date | 日历 年月日 |
month | 日历 年月 |
week | 日历 某一年的第几周 |
number | 只能输入数字 |
range | 滑块 |
search |