AvailabilityJavaScript 1.0; enhanced in JavaScript 1.1 Inherits from/OverridesInherits from Input, HTMLElement Synopsisform.name form.elements[i] PropertiesPassword inherits properties from Input and HTMLElement and defines or overrides the following:
MethodsPassword inherits methods from Input and HTMLElement. Event HandlersPassword inherits event handlers from Input and HTMLElement. HTML SyntaxA Password element is created with a standard HTML <input> tag: <form> ... <input type="password" // Specifies that this is a Password element [ name="name" ] // A name you can use later to refer to this element // Specifies the name property [ value="default" ] // The default value transmitted when the form is submitted [ size="integer" ] // How many characters wide the element is > ... </form> DescriptionThe Password element is a text input field intended for input of sensitive data, such as passwords. As the user types characters, only asterisks appear. This prevents bystanders from reading the input value over the user's shoulder. As a further security precaution, there are limitations on how JavaScript can read and write the value property of a Password element. See the Text and Input reference pages for more information. See AlsoInput, Text; HTMLInputElement in the DOM reference section |