标签:err data ted dmi admin .ajax pen 获取 for
jsp:
<td class="formItem_content">
<select name="label" id = "label" style="height:30px">
<option value="" id=‘-1‘>--请选择--</option>
</select>
</td>
js:
function labelCascade(){
$.ajax({
url:"admin/dianliang/gongyong/label/select/",
data:encodeURI(
)
,
type:"post",
success:function(data){
var resultList = data.resultList;
var options = "";
for(var i = 0 ;i<resultList.length;i++ ){
var obj = resultList[i];
options+="<option value=‘"+obj.id+"‘>"+obj.label_name+"</option>";
}
$("#label").empty().append(options);
},
error:function(){
alert("error");
}
});
}
var label_id= $.trim($(‘#label option:selected‘,iframe.document).val());
var label_name = $.trim($(‘#label option:selected‘,iframe.document).text());
标签:err data ted dmi admin .ajax pen 获取 for
原文地址:http://www.cnblogs.com/cuicuicong/p/6140474.html