HTML DOM type Property
Complete Password Object Reference
Definition and Usage
The type property returns the type of form element. For a password field this will always be "password".
Syntax
Example
The following example returns which type of form element the password field
is:
<html>
<body>
<form>
<input type="password" id="password1" />
</form>
<script type="text/javascript">
x=document.getElementById("password1");
document.write("Form element type is: ");
document.write(x.type);
</script>
</body>
</html>
|
Try-It-Yourself Demos
Get
the type of form element (password field)
Complete Password Object Reference
|