.Maui Blog

Javascript | Trigger Change event on select

var mySelect = document.querySelector("#mySelect");
mySelect.value = "newvalue";
mySelect.dispatchEvent(new Event('change', {
    'bubbles': true
}));
Exit mobile version