Latest web development tutorials

HTML DOM Sandi pilih () metode

Sandi Referensi Obyek Kata benda

Definisi dan Penggunaan

memilih metode () digunakan untuk memilih teks bidang sandi

tatabahasa

passwordObject.select()


Dukungan Browser

Internet ExplorerFirefoxOperaGoogle ChromeSafari

Semua browser utama mendukung pilih metode ()


contoh

contoh

Contoh-contoh berikut dapat dipilih teks domain password:

<! DOCTYPE html>
<Html>
<Head>
<Meta charset = "utf-8">
<Title> Tutorial ini (w3big.com) </ title>
<Script>
Fungsi myFunction () {
document.getElementById ( "pwd") pilih () .;
}
</ Script>
</ Kepala>
<Body>

<Form>
Password: <input type = "password" id = "pwd" value = "thgrt456">
</ Form>
<Tombol type = "button" onclick = "myFunction ()"> pilih konten </ button>

</ Body>
</ Html>

Coba »


Sandi Referensi Obyek Kata benda