HTML-DOM Passwort Formulareigenschaften
Definition und Verwendung
bilden Eigenschaft gibt das Passwort-Feld Verweis auf das Formular enthält.
Diese Eigenschaft gibt ein Formular-Objekt.
Grammatik
passwordObject.form
Browser-Unterstützung
Alle gängigen Browser unterstützen Formulareigenschaften
Beispiele
Beispiele
Das folgende Beispiel ist das Passwort-Feld gehört zur Form-ID aus:
<! DOCTYPE html>
<Html>
<Head>
<Meta charset = "UTF-8">
<Titel> Dieses Tutorial (w3big.com) </ title>
<Script>
Funktion displayResult () {
var x = document.getElementById ( "pwd") form.id .;
alert (x);
}
</ Script>
</ Head>
<Body>
<Form id = "form1">
Kennwort: <input type = "password" id = "PWD">
</ Form>
<Taste type = "button" Onclick = "displayResult ()"> id Form Anzeige gehört </ button>
</ Body>
</ Html>
<Html>
<Head>
<Meta charset = "UTF-8">
<Titel> Dieses Tutorial (w3big.com) </ title>
<Script>
Funktion displayResult () {
var x = document.getElementById ( "pwd") form.id .;
alert (x);
}
</ Script>
</ Head>
<Body>
<Form id = "form1">
Kennwort: <input type = "password" id = "PWD">
</ Form>
<Taste type = "button" Onclick = "displayResult ()"> id Form Anzeige gehört </ button>
</ Body>
</ Html>
Versuchen »
Kennwort Objekte