INPUT type=password Element | INPUT type=password Object

DHTML, HTML, & CSS

 
Click to return to the DHTML, HTML & CSS home page    
INPUT type=image     INPUT type=radio     DHTML Objects    

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

INPUT


Back to topBack to top

Did you find this topic useful? Suggestions for other topics? write us!Internet Link

© 1999 microsoft corporation. all rights reserved. terms of useInternet Link.