这是我的回调,其中数组的第一项是title
,第二项是button
。
jQuery21306342411266173318_1460205778290([["I see you like this Mazda, don't you?","OK, give more info!"]])
在前端我使用它,它向我展示了两个项目。如何分别获得第一个(title
)和第二个(button
)?
function showPopup(data) {
console.log(data[0]);
}
function alert(){
$.getJSON("handler.php?type=alert&callback=?&cookie="+ y, showPopup);
}