79467830

Date: 2025-02-25 20:47:30
Score: 1
Natty:
Report link

Why don't you add an attribute to the input after you change it's value programmatically like this:

HTML:

<button
    onClick="changeAttribute"
    type="button">Programmatically change Country
</button>

Javascript:

function changeAttribute() {
 document.getElementById("country").setAttribute("autocomplete", "off");
}

Keep in mind that you might want to adjust this code to your requirements.

Reasons:
  • Has code block (-0.5):
  • Starts with a question (0.5): Why don't you add an
  • Low reputation (1):
Posted by: Yaniek