Saturday, 23 June 2012

How to create Password box in HTML Forms

You can add a password box to your form. This is identical to a text box in its appearance. The only difference is that when you type in the box the characters are replaced by asterisks ( * ). It's important to remember that although a password box hides the text from prying eyes, the data is not encrypted in any way. If you use METHOD=Get instead of Post, the password would show up in the address line of the browser.

The code for a password box is this:

<INPUT TYPE="Password" SIZE="20" MAXLENGTH="8">

The MAXLEGTH attribute is the maximum number of characters that can be entered into the password text box. SIZE is how wide you want the password box to be.

No comments:

Post a Comment