我从 php 后端收到 jsong 响应,例如
feedback = {"html":"<form action='someurlonrest' method='post' style='margin-left:100px;' ><div style='padding: 10px;'>Ticket No<input type='text' id='tkt' name='tkt' ><\/div><div style='padding: 10px;'>somthing <input type='text' id='smthing' name='smthing' ><\/div><div style='padding: 10px;'>Query about <input type='text' id='query' name='query' ><\/div><input type='submit' class='classname' ><\/form>"}
为什么每当我尝试做时都会收到未定义的消息
alert(feedback.html);
更新
function get_fb_success(){
var feedback = $.ajax({
type: "POST",
url: "feedback.php",
async: false
}).success(function(){
setTimeout(function(){get_fb_success();}, 100000000000000000);
}).responseText;
alert(feedback);
//$('#log_success').val('');
$('#log_success').html(feedback.html);
//$('div.feedback-box-success').html('success feedback');
}