我想用修改后的AJAX响应将id中的内容替换为id = test。
javascript:
('.test').bind('ajax:success', function()
{
$.ajax({
success: function(html){
$('.test').text($(html).find("#test")); // returns [object Object]
}
});
});
但是$(html).find("#test")返回了[object Object],$(html).find("#test").html()返回了null——如何在ajax响应中获取ID为“ test”的div内容?