[英]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.