Password.name

JavaScript 1.0+, JScript 1.0+ Nav2+, IE 3+, Opera3+ Syntax

							password.name

Description

The name property of the Password object is used to get the HTML NAME attribute of the password box.

Example

Listing 7.419 shows an example of how the name property is used. When the button is clicked, an alert box is displayed showing the password object name.

Listing 7.419 Example of the name Property
<html>
<head>
<title> Example of the password name property</title>
</head>
<body>

<form name="form1">
<input type="PASSWORD" Name="pass" size=10>
<br>
<input type="BUTTON" value="Show Formname" onClick=alert(document.form1.pass.name)>
</form>

</body>
</html>
							
						

Get Pure JavaScript 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.