密码输入框(暗文输入)
一、暗文与明文
密码框实际上就是一个设置了type
属性 的 input
标签
明文输入:<input type="text">
暗文输入:<input type="password">
二、效果
三、代码
明文<input type="text">
<br>
暗文<input type="password">
四、扩展
常用的type
属性取值还有
type | 效果 |
---|
radio | 单选框 |
checkbox | 多选框 |
submit | 提交按钮 |
image | 图片按钮 |
reset | 重置按钮 |