HTML-DOM Passwort wählen () -Methode
Definition und Verwendung
select () Methode verwendet, um das Passwort-Feld Text zu markieren
Grammatik
passwordObject.select()
Browser-Unterstützung
Alle gängigen Browser unterstützen select (Methode)
Beispiele
Beispiele
Die folgenden Beispiele können mit einem Passwort Domain Text ausgewählt werden:
<! DOCTYPE html>
<Html>
<Head>
<Meta charset = "UTF-8">
<Titel> Dieses Tutorial (w3big.com) </ title>
<Script>
Funktion myFunction () {
document.getElementById ( "pwd") wählen () .;
}
</ Script>
</ Head>
<Body>
<Form>
Kennwort: <input type = "password" id = "PWD" value = "thgrt456">
</ Form>
<Taste type = "button" Onclick = "myFunction ()"> wählen Inhalt </ button>
</ Body>
</ Html>
<Html>
<Head>
<Meta charset = "UTF-8">
<Titel> Dieses Tutorial (w3big.com) </ title>
<Script>
Funktion myFunction () {
document.getElementById ( "pwd") wählen () .;
}
</ Script>
</ Head>
<Body>
<Form>
Kennwort: <input type = "password" id = "PWD" value = "thgrt456">
</ Form>
<Taste type = "button" Onclick = "myFunction ()"> wählen Inhalt </ button>
</ Body>
</ Html>
Versuchen »
Kennwort Objekte