【发布时间】:2012-02-17 18:42:47
【问题描述】:
所有, 我正在使用 jQuery/AJAX 调用一个文件来基本上保存它是否有人喜欢一首歌。我正在尝试执行以下操作:
var html = $.ajax({
type: "POST",
url: "save_song.php",
data: "song_id=" + song_id + "&love_like_hate=hate",
async: false
}).responseText;
$("#div_song_id_"+song_id).html(responseText1);
$("#love_it").html(responseText2);
然后在 PHP 端有这样的东西:
echo "This text would go in response text 1";
echo "This text would go in response text 2";
所以基本上我试图在 save_song.php 文件中有多个回声,然后基本上说第一个回声进入第一个 div,第二个回声进入需要更新的第二个 div。知道怎么做吗?
【问题讨论】: