Password.select() (Method)

All text in the password text entry cell is selected and can be cut and pasted by the user.

Availability:

DOM level - 1
JavaScript - 1.0
JScript - 1.0
Internet Explorer - 3.02
Netscape - 2.0
Opera - 3.0
JavaScript syntax:-myPassword.select()

If the browser supports a Selection object or TextRange objects, you may then be able to access the selected text using JavaScript. Of course in a form object, the text of the whole object can also be accessed but this may not be what was selected because the user may select all or part of a page and that selection may span several form elements or select only part of a form element.

See also:Input.select(), Selection object