我有一個php頁面,它從提供的instagram帳戶中提取個人資料圖片URL。例如,如果你去..使用AJAX從php頁面收集鏈接並更新圖像
.com/ajax_check_instagram.php?username=tom
的頁面會返回
http://instagram.com/profilepic.png
我那麼有哪些即時通訊試圖操縱這樣的研製成功功能更新圖像源Ajax調用。
//Add a loading image in the span id="availability_status"
var link = '';
$.ajax2({ //Make the Ajax Request
type: "POST",
cache: false,
dataType: "json",
url: "/ajax_grab_instagram.php", //file name
data: "username="+ username, //data
success: function(server_response){
link = server_response;
$("#profilepic").attr("src","link");
}
});
}
如何格式化server_response行和jquery行?
您可能還需要在這一點上也驗證URL! – 2014-11-03 17:09:54
我以爲我很接近,它看起來不像這實際上是爲我工作:( – SlowPoke 2014-11-03 17:27:48
它看起來像服務器發送回鏈接確定,但阿賈克斯沒有得到應用? – SlowPoke 2014-11-03 17:28:35