密码输入框(暗文输入)
一、暗文与明文
密码框实际上就是一个设置了type
属性 的 input
标签
明文输入:<input type="text">
暗文输入:<input type="password">
二、效果
![请添加图片描述](https://i-blog.csdnimg.cn/blog_migrate/c16fd652807dcb159aabb773ed41ac0d.gif)
三、代码
明文<input type="text">
<br>
暗文<input type="password">
四、扩展
常用的type
属性取值还有
type | 效果 |
---|
radio | 单选框 |
checkbox | 多选框 |
submit | 提交按钮 |
image | 图片按钮 |
reset | 重置按钮 |