[英]fetch json array and append data in another page
我正在尝试使用jQuery将json数组传递到另一个页面,并且在另一个页面上我想将数据绑定到相应的元素。这是我的ajax请求:
$.ajax({
type: "GET",
url: 'url of the php page',
data: {'json':jsondata},
dataType :'json',
async: false,
encode: true
}).done(function(data) {
window.location.href = 'anotherpageurl?res='+encodeURIComponent(JSON.stringify(data));
});
这是我收到的url的json响应:
{
"data": [
{
"full_name": "xxxx",
"employee_id": "xxxxx",
"imageUrl": "xxxx",
"dname": "xxxx"
},
{
"full_name": "xxxxx",
"employee_id": "xxxxx",
"imageUrl": "xxxx",
"dname": "xxxx"
}
]
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.