★ wanayoo — archive 1999 http://msdn.microsoft.com/workshop/author/dhtml/reference/objects/INPUT_password.aspNouvelle recherche | Portail wanayoo
MSDN Online Web Workshop   All Products  |   Support  |   Search  |   microsoft.com Home  
microsoft.com Home
  Home  |   Magazines  |   Libraries  |   Developer Centers  |   Resources  |   Downloads  |   Search MSDN
 
INPUT type=image Element ...     INPUT type=radio Element ...     DHTML Objects    
Web Workshop  |  DHTML, HTML & CSS

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 =/old?u=http%3A%2F%2Fmsdn.microsoft.com%2Fworkshop%2Fauthor%2Fdhtml%2Freference%2Fobjects%2F%3C%2FB&y=1999> 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