jquery总结
时间:2014-08-05 11:41:29
收藏:0
阅读:226
一、$表示jquery对象
二、样本
1.ajax进行json交互
$.ajax({
url : path+"expressDic.do?parentId="
+ parentId,
type : ‘post‘,
dataType : ‘json‘,
timeout : 5000,
error : function() {
alert(‘加载数据异常,请重试!‘);
},
success : function(data) {
$.each(eval(data), function(i, item) {
$(
"<option value=‘" + item.districtId + "‘>"
+ item.districtName + "</option>").appendTo(
citySelect);
});
}
});
评论(0)