HTML DOM Password select () method
Definition and Usage
select () method used to select the password field text
grammar
passwordObject.select()
Browser Support
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>
<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 objects