Adscend

Click Here



Click Here



Click Here

Sunday 8 September 2013

Form Input Element Password Field

HTML Form Input Element Password Field

1.Password field is used to allow users to entry password.

2.The characters in a Password field are shown as asterisks or bullets instead of characters in a password field.

3.<input type="password" /> defines a Password field.


Password boxes use the following attributes

type—password
size—determines the size of the password in characters.
maxsize—determines the maximum number of characters that the field will accept.
name—the name of the variable to be sent to the CGI application.
value—will display its contents as the default value.

Example: 1
<html>
<body>
<form>
Name: <input type ="password" name="pw"/><br/>
<input type="submit"/>
</form>
</body>
</html>
Output
Name:


To change the size of text width input box, add another attribute called size.
Example: 2
<html>
<body>
<form>
Name: <input type ="password" name="pw " size="10"/><br/>
<input type="submit"/>
</form>
</body>
</html>
Output
Name:


If you want to limit the amount of characters put in the text box, need another attribute called maxlength.
Example: 3
<html>
<body>
<form>
Name: <input type ="password" name="pw " size="10" maxlength="5"/><br/>
<input type="submit"/>
</form>
</body>
</html>
Output
Name:




No comments:

Post a Comment