I have a wep app that has an autocomplete feature that being triggered when the user insert’s a few specifhic words.
I would like to know how can I create a checkbox using HTML that will enable and disable the autocomplete.
Thanks,
Shoam
I was trying to find a way to do that but did not found a way, even tho I knlw it should not be too complex.
2
Answers
If the checkbox is checked, it will have set the autocomplete attribute of the input element with the autocomplete="off" attribute to on. If the checkbox is unchecked, it will have set the autocomplete attribute to off.
Set the
autocomplete
attribute on the input on thechange
event for the checkbox usingevent.target.checked
: