当前位置: 代码迷 >> ASP.NET >> js怎么得到DropDownList里选中得值
  详细解决方案

js怎么得到DropDownList里选中得值

热度:2535   发布时间:2013-02-25 00:00:00.0
js如何得到DropDownList里选中得值
问题:有两个DropDownList(没有启用AutoPostBack属性)。当第一个DropDownList里选中的值与我设定的值一样,就会触发第二个DropDownList显示相关的内容。我现在想用js来做第一个DropDownList的功能。
请教怎么实现?在线等

------解决方案--------------------------------------------------------
不知道楼主是不是要实现这个意思
JScript code
<script language = "JavaScript">function clk(){    var count = document.getElementById("dropdownlistid").selectedIndex;    if(document.getElementById("dropdownlistid").options[count].innerText == 设置的值)        {             xxxxx    }</script>
  相关解决方案