Home >Web Front-end >HTML Tutorial >How to dynamically get the value in a drop-down list? I want to judge by getting the value of the drop-down list_html/css_WEB-ITnose
<select name="role"><option value="校长助理" name="asistant" selected>校长助理</option>><option value="财务人员" name="moneyManage">财务人员</option><option value="家长" name="parents">家长</option></select>
What is dynamic acquisition and how to obtain it, I don’t understand the meaning
var selectInfo=document.getElementById ('selectID');
var selectCon=selectInfo.options[selectInfo.selectedIndex].innerHTML;
Thank you everyone, I have solved it!