HTML DOM name Property
Complete Password Object Reference
Definition and Usage
The name property sets or returns the name of the password field.
Syntax
Example
The following example gets the name of the password field:
<html>
<body>
<form id="form1">
<input type="password" id="password1" name="password1" />
</form>
<p>The name of the password field is:
<script type="text/javascript">
x=document.getElementById('password1');
document.write(x.name);
</script></p>
</body>
</html>
|
Try-It-Yourself Demos
Get
the name of a password field
Complete Password Object Reference
|