- //假设你的dropdownlist叫Select1
- document.getElementById('Select1').options[document.getElementById('Select1').selectedIndex].value;//value值
- document.getElementById('Select1').options[document.getElementById('Select1').selectedIndex].text;//text值
js获取dropdownlist的text/value
最新推荐文章于 2016-10-04 13:51:00 发布
本文介绍了一种使用JavaScript来获取HTML中DropdownList(下拉列表)所选项目的值和文本的方法。这种方法适用于网页开发者需要动态获取用户选择的情况。
1693

被折叠的 条评论
为什么被折叠?



