SyntaxFix
Write A Post
Hire A Developer
Questions
select = document.getElementById('selectId'); var opt = document.createElement('option'); opt.value = 'value'; opt.innerHTML = 'name'; opt.selected = true; select.appendChild(opt);