I have a dynamically created select option using a javascript function. the select object is
<
To set value in JavaScript using set attribute , for selected option tag
var newvalue = 10; var x = document.getElementById("optionid").selectedIndex; document.getElementById("optionid")[x].setAttribute('value', newvalue);