jquery获得下拉框值的代码
标签:style c ext a color width
$("#ddlRegType").find("option:selected").text();
$("#ddlRegType
").get(0).selectedIndex;
$("#ddlRegType
").get(0).selectedIndex=index;//index为索引值
$("#ddlRegType
").attr("value","Normal“);
$("#ddlRegType
").val("Normal");
$("#ddlRegType ").get(0).value =
value;
var count=$("#ddlRegType
option").length;
{ if($("#ddlRegType
").get(0).options[i].text == text)
$("#ddlRegType
").get(0).options[i].selected = true;
$("#select_id
option[text=‘jQuery‘]").attr("selected", true);
$("#select_id").append(""); //添加一项option
$("#select_id").prepend(""); //在前面插入一项option
$("#select_id option:last").remove();
//删除索引值最大的Option
$("#select_id
option[index=‘0‘]").remove();//删除索引值为0的Option
$("#select_id
option[value=‘3‘]").remove(); //删除值为3的Option
$("#select_id
option[text=‘4‘]").remove(); //删除TEXT值为4的Option
$("#ddlRegType
").empty();
jquery获得下拉框值的代码,搜素材,soscw.com
jquery获得下拉框值的代码
标签:style c ext a color width
原文地址:http://www.cnblogs.com/imteach/p/3735985.html
评论