Password : Password : Form JAVASCRIPT TUTORIALS


JAVASCRIPT TUTORIALS » Form » Password »

 

Password









The Password object refers to the HTML element created with the tag setting the type to specify password.

Instead of displaying the input in cleartext, input is displayed using the * symbol.



















































Property/Method Description
blur() Removes focus from the password box
defaultValue Refers to the VALUE attribute of the HTML password box
focus() Sets focus to the password box
form Refers to the form that contains the password box
handleEvent() Invokes the event handler
name Refers to the NAME attribute of the HTML password box
onBlur Event handler used when the focus is removed from the password box
onFocus Event handler used when the focus is put on the password box
select() Selects the text entered in the password box
type Refers to the TYPE attribute of the HTML password box
value Refers to the current contents of the password box















<html>
    <head>
    <title> Creating a password object</title>
    </head>
    <body>
    <form name="form1">
    <input type="PASSWORD" Name="pass" size=10>
    <br>
    <input type="BUTTON" value="Show Password" onClick=alert(document.form1.pass.value)>
    </form>
    </body>
    </html>







HTML code for linking to this page:

Follow Navioo On Twitter

JAVASCRIPT TUTORIALS

 Navioo Form
» Password