|
|
1 、jquery操作select<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />
<div class="quote_div"> $(“.selectEd”).find(“option:selected’).text();获取选中的select的值
$(“#selectId option[‘index=0’]”).remove();删除索引为0的option
$(“#selectId option[‘value=3’]”).remove();删除value为3的值
$(“#selectId”).change(function (){......});
$(“#selectId”).append(“<optionvalue=”value”>text</option>”);为select追加一个option(下拉项)
var index = $(“#selectId”).find(“option:selected”).index();//获取选中共的option的index |
|