源代码
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv="X-UA-Compatible" content="ie=edge"> <title>编程字典</title> </head> <body> <form action=""> 用户名:<br> <input type="text" name="userid"> <br> 密码:<br> <input type="password" name="psw"> </form> <p>password字段不会显示出来,会显示星号或者圆点</p> </body> </html>
运行结果