Input Search autocomplete Attribute
Definition and Usage
autocomplete
Set the attribute or return the value of the autocomplete attribute in the search field.
After enabling autocomplete, the browser will automatically complete values based on the user's previous inputs.
Tip:In some browsers, you may need to enable the autocomplete feature to make it work properly (check under "Preferences" in the browser menu).
See also:
HTML Reference Manual:HTML <input> autocomplete Atribute
Example
Example 1
Set the autocomplete of the search field to off:
document.getElementById("mySearch").autocomplete = "off";
Example 2
Return the state of autocomplete:
var x = document.getElementById("mySearch").autocomplete;
Syntax
Return the autocomplete attribute:
searchObject.autocomplete
Set the autocomplete attribute:
searchObject.autocomplete = "on|off"
Halaga ng Atribute
Halaga | Paglalarawan |
---|---|
on | Default. Ang browser ay magpapakita ng automatic completion ng halaga ayon sa nakaraang binigay ng gumagamit. |
off | Ang bawat paggamit ng gumagamit ay dapat maglagay ng halaga sa bawat text field. Hindi magpapakita ng automatic completion ang browser. |
Detalye ng Teknolohiya
Halaga ng Bawas: | String na halaga, naglalarawan ng estado ng automatic completion. |
---|
Suporta ng Browser
Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|
Chrome | Edge | Firefox | Safari | Opera |
Suporta | Suporta | Suporta | Suporta | Suporta |