当然可以了,不过那样点击时很费劲, 你试试 就知道了, 不容易得到你想要的值用onchange比较好用

解决方案 »

  1.   

    Dropdownlist1.Attributes.Add("onchange", 
    "alert(document.all('Dropdownlist1').value)");
      

  2.   

    onchange只是在客户端js中取得值要返回到服务端就要把值post回去
      

  3.   

    在客户端通过
    document.all('ddltaskstyle').value 
    取得它的值,
      

  4.   

    you can get the select text like this:string sText=DropDownList1.SelectItem.Text;
      

  5.   

    问题是你想在什么时候获得值,如果是在服务器端,你必须postback回去
      

  6.   

    response.write(DropDownList1.SelectItem.Text)
      

  7.   

    要不久做一个Text临时保存,然后在服务器断获得