G
grpramodkumar
HI,
function change(value,sub) {
subcat = document.getElementById(sub);
subcat.options.value = value;
}
<select id="aa">
<option value="1">one</option>
<option value="2">two</option>
</select>
<input type="button" value="Click" onclick="change(2,'aa');">
I am trying to change the value of a select box dynamicaly on click ,
the above code is working in IE , but not in firefox,
Thanks,
function change(value,sub) {
subcat = document.getElementById(sub);
subcat.options.value = value;
}
<select id="aa">
<option value="1">one</option>
<option value="2">two</option>
</select>
<input type="button" value="Click" onclick="change(2,'aa');">
I am trying to change the value of a select box dynamicaly on click ,
the above code is working in IE , but not in firefox,
Thanks,