HTML DOM Password size property
Definition and Usage
size property sets or returns the width of the password field (numeric characters).
The default value is 20.
grammar
Set size properties:
passwordObject.size=integer
Returns size properties:
passwordObject.size
Browser Support
All major browsers support attribute size
Examples
Examples
Set Password field width:
<! DOCTYPE html>
<Html>
<Head>
<Meta charset = "utf-8">
<Title> This tutorial (w3big.com) </ title>
<Script>
function setResult () {
document.getElementById ( "pwd") size = 40.;
}
</ Script>
</ Head>
<Body>
<Form>
Password: <input type = "password" id = "pwd">
</ Form>
<Button type = "button" onclick = "setResult ()"> set the width </ button>
</ Body>
</ Html>
<Html>
<Head>
<Meta charset = "utf-8">
<Title> This tutorial (w3big.com) </ title>
<Script>
function setResult () {
document.getElementById ( "pwd") size = 40.;
}
</ Script>
</ Head>
<Body>
<Form>
Password: <input type = "password" id = "pwd">
</ Form>
<Button type = "button" onclick = "setResult ()"> set the width </ button>
</ Body>
</ Html>
try it"
Password objects