Latest web development tutorials

HTML DOM Password form properties

Password Object Reference Password objects

Definition and Usage

form property returns containing the password field reference to the form.

This property returns a form object.

grammar

passwordObject.form


Browser Support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support form properties


Examples

Examples

The following example has made the password field belongs to the form id:

<! DOCTYPE html>
<Html>
<Head>
<Meta charset = "utf-8">
<Title> This tutorial (w3big.com) </ title>
<Script>
function displayResult () {
var x = document.getElementById ( "pwd") form.id.;
alert (x);
}
</ Script>
</ Head>
<Body>

<Form id = "form1">
Password: <input type = "password" id = "pwd">
</ Form>
<Button type = "button" onclick = "displayResult ()"> id form display belongs </ button>

</ Body>
</ Html>

try it"


Password Object Reference Password objects