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

WBOY
Release: 2016-06-24 12:21:27
Original
1242 people have browsed it

<select name="role"><option value="校长助理" name="asistant" selected>校长助理</option>><option value="财务人员" name="moneyManage">财务人员</option><option value="家长" name="parents">家长</option></select>
Copy after login


Reply to the discussion (solution)

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!

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template