How do I programmatically set the value of a select box element using JavaScript?

后端 未结 17 1675
轮回少年
轮回少年 2020-11-22 06:33

I have the following HTML

17条回答
  •  终归单人心
    2020-11-22 06:55

    document.getElementById('leaveCode').value = '10';
    

    That should set the selection to "Annual Leave"

提交回复
热议问题