首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > asp.net >

js怎么得到DropDownList里选中得值

2012-03-07 
js如何得到DropDownList里选中得值问题:有两个DropDownList(没有启用AutoPostBack属性)。当第一个DropDownL

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> 

热点排行