jquery select change下拉框选项变化判断选中值

时间:2024-11-18 07:24:51

                    <th class="formTitle">
                        是否转出:
                    </th>
                    <td class="formValue" colspan="3">
                        <select  class="txtselect required" datacol="yes" err="是否转出" checkexpession="NotNull">
                            <option value=""></option>
                            <option value="是">是</option>
                            <option value="否">否</option>
                        </select>
                    </td>

脚本调用

$("#IsTurnOut").change(function () {
            var ss = $(this).children('option:selected').val();
            if (ss == "是") {

            } else if (ss == "否") {

            }
        });