Latest web development tutorials

HTML DOM Password select () method

Password Object Reference Password objects

Definition and Usage

select () method used to select the password field text

grammar

passwordObject.select()


Browser Support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support select () method


Examples

Examples

The following examples can be selected password domain text:

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

<Form>
Password: <input type = "password" id = "pwd" value = "thgrt456">
</ Form>
<Button type = "button" onclick = "myFunction ()"> select content </ button>

</ Body>
</ Html>

try it"


Password Object Reference Password objects