dropdownlist select的用法

<tr>
        <td></td>
        <td>@Html.DropDownList("ddlSex",@Model.SList)</td>
    </tr>
      <tr>
        <td></td>
        <td>@Html.DropDownList("ddlCity",@Model.CityList)</td>
    </tr>
    <tr><td>
           <input id="btnTestSelect" type="button" value="TestSelector"  onclick="TestJquery()"/>
        </td>
        <td></td>
    </tr>

   function TestJquery()
    {

        alert($("#ddlSex option:selected").text());
        alert($("#ddlSex").find("option:selected").text());
       $("select option:selected").each(function () {
           alert($(this).text());
       })


  }

原文地址:https://www.cnblogs.com/sxjljj/p/8533143.html