How to fire a change event on a HTMLSelectElement if the new value is the same as the old?

后端 未结 8 1529
天命终不由人
天命终不由人 2020-11-28 23:29

I have the following markup:


    
    
    


function jsFunction(){
  var myselect = document.getElementById("selectOpt");
  alert(myselect.options[myselect.selectedIndex].value);
}

提交回复
热议问题