ajax拼接
$('#').click(function () {
$.ajax({
type:"get",
dataType:"json",
url:"#",
success:function (msg) {
//返回数据处理
console.log(msg);
var length = msg.length;
var html = "";
for(var i = 0;i<length;i++) {
html = html + "<div class='tanchu-list' ondblclick='db(this)'>" +
"<span>" + msg[i].id + "</span>" +
"<div>" + msg[i].n_gift_name + "</div>" +
"<span>" + msg[i].n_gift_type + "</span>" +
"</div>";
}
$(".listInfo").html(html)
}
})
})