Text input box, enter the password box

When the user to type letters, numbers, and other content in the form, it will use the text entry box . Text boxes can be turned into a password input box .

Syntax :

<form>
   <input type="text/password" name="名称" value="文本" />
</form>

1、type:

   当type="text"时,输入框为文本Input box;

   当type="password"时, 输入框为密码输入框。

2、name:为文本框命名,以备后台程序ASP 、PHP使用。

3、value:为文本输入框设置默认值。(一般起到提示作用)

Example:

 

<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>文本输入框、密码输入框</title>
</head>
<body>
<form  method="post" action="save.php">
    账户: 
    <input type = "text" name = "myName"</>= "example: John Doe"value 
    br />
    密码: 
    <input type = "password" name = "pass" />

</form> 
</body>
</html>

 

Browser output:

Accounts:  
password: 

 

 

Guess you like

Origin www.cnblogs.com/iBoundary/p/11421946.html