Name

defaultValue — NN 2 IE 3 DOM 1

Synopsis

Read-only

The default text for the password input element, as established by the VALUE attribute.

Example

var pwObj = document.forms[0].myPassword
if (pwObj.value != pwObj.defaultValue ) {
    ...
}

Value

Any string value.

Default

None.

Get Dynamic HTML: The Definitive Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.