In my HTML page I have 2 select menus with IDs \"month\" and \"day\" - \"day\" is empty when the page loads, \"month\" has 12 options with values 1-12 corresponding to Janua
I came to this question and wanted to share my problem/answer hoping it may help others.
I had this which did not work:
function change_select() {
var sel = document.getElementById('my-id').innerHTML;
sel = '';
}
I changed it to this which did work:
function change_select() {
var sel = document.getElementById('my-id');
sel.innerHTML = 'option>new item';
}