INPUT type=password Element | INPUT type=password Object
Creates a single-line text entry control similar to the text control, except that text is not displayed as the user enters it.
HTML Syntax
<INPUT ACCESSKEY = key ALIGN = LEFT | CENTER | RIGHT ALT = text CLASS = classname DISABLED ID = value LANG = language LANGUAGE = JAVASCRIPT | JSCRIPT | VBSCRIPT | VBS LOWSRC = url MAXLENGTH = n NAME = name READONLY SIZE = n STYLE = css1-properties TABINDEX =n TITLE =text TYPE = PASSWORD VALUE = value event = script >
Remarks
The password element is an inline element and does not require a closing tag.
This element is available in HTML and script as of Microsoft® Internet Explorer 3.0.
Members
Styles
Example
This example uses the password element to define a password field.
Sample Code
Username <INPUT TYPE=button ID=txtUser> Password <INPUT TYPE=password ID=txtPassword>This example uses script to determine whether the password is valid for the specified user.
<SCRIPT> if (txtUser.value == "Paul") if (txtPassword.value == "2ifbysea") { alert("Password accepted. Enjoy your ride."); return true; } </SCRIPT>
See Also
Did you find this topic useful? Suggestions for other topics? write us!
© 1999 microsoft corporation. all rights reserved. terms of use.