日期:2014-05-16  浏览次数:20994 次

jquery 怎样获取select多选下拉框所有选项的值
<form method="post" name="myform">
<table>
    <tbody>
        <tr>
            <td>
                部门:
                @Html.DropDownList("groups", Html.GetDepartmentSelectList(), "请选择...", new Dictionary<string, object>
                    {
                        {"onchange", "createFunction();"}
                    })
                <br />
                <select id="leftItem" name="leftItem" multiple="multiple" size="20" style="height: 250px;
                    width: 250px;" ondblclick="moveOption(document.myform.leftItem, document.myform.rightItem)">
                </select>
            </td>
            <td>
                <input type="button" id="btnAdd" value="<< " onclick="moveOption(document.myform.rightItem, document.myform.leftItem)" /><br />
                <input type="button" id="btnDel" value=" >>" onclick="moveOption(document.myform.leftItem, document.myform.rightItem)" /><br />
                <input type="button" id="btnGroup" value="分配人员" onclick="save()" />
            </td>
            <td>
                员工:<br />
                <select id="rightItem" name="rightItem" multiple="multiple" size="20" style="height: 250px;
                    width: 250px;" ondblclick="moveOption(document.myform.rightItem, document.myform.leftItem)">
                    @{var i = 0;
                      foreach (var item in Model)
                      {
&nb