alert(document.all('DropDownList1').options[0].text);

解决方案 »

  1.   

    i=form1.DropDownList1.selectedIndex;
    text=form1.DropDownList1(i).value;
      

  2.   

    Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load        Button1.Attributes("onclick") = "alert(document.all('DropDownList1').options[0].text);return false;"    End Sub
      

  3.   

    try
    document.getElementById('DropDownList1').value
      

  4.   

    document.all('DropDownList1').options[document.all('DropDownList1').selectedIndex].innerText
      

  5.   

    thanks for your points:)
      

  6.   

    是不是dorpdownlist的autopostback属性没有设置?
      

  7.   

    多谢各位赏光,特别感谢 hgknight(江雨.net)!!新年快乐!!