Masukkan URL pelengkapan otomatis Properti
Contoh
Setel pelengkapan otomatis di bidang URL ke nonaktif:
document.getElementById("myURL").autocomplete = "off";
Definisi dan Penggunaan
Properti pelengkapan otomatis menyetel atau mengembalikan nilai atribut pelengkapan otomatis di bidang URL.
Saat pelengkapan otomatis aktif, browser secara otomatis melengkapi nilai berdasarkan nilai yang telah dimasukkan pengguna sebelumnya.
Tip: Di beberapa browser Anda mungkin perlu mengaktifkan fungsi pelengkapan otomatis agar ini berfungsi (Lihat di bawah "Preferensi" di menu browser).
Dukungan Peramban
Property | |||||
---|---|---|---|---|---|
autocomplete | Yes | 10.0 | Yes | Not supported | Yes |
Sintaksis
Kembalikan properti pelengkapan otomatis:
urlObject.autocomplete
Setel properti pelengkapan otomatis:
urlObject.autocomplete = "on|off"
Nilai properti
Value | Description |
---|---|
on | Default. The browser will automatically complete values based on values that the user has entered before |
off | The user must enter a value into each URL field for every use. The browser does not automatically complete entries |
Detail Teknis
Nilai Kembali: | Sebuah String, mewakili status pelengkapan otomatis |
---|
Lebih Banyak Contoh
Contoh
Kembalikan status pelengkapan otomatis:
var x = document.getElementById("myURL").autocomplete;
Halaman Terkait
Referensi HTML: HTML <input> Atribut pelengkapan otomatis
Masukkan Objek URL