我从 firebug 收到以下语法错误:
SyntaxError: missing ) 在参数列表之后
$.ajax({ //create an ajax request to load_page.php
type: "POST",
url: "display.php",
data:{faculties:faculty},
dataType: "json", //expect json to be returned
success: function(response)
{
$.each(response,function(i,item)
{
$("table tbody").append("<tr><td>"+response[i].code+"</td>"+"<td>"+response[i].title"</td>"+"<td>"+response[i].lecturer"</td"+"<td>"+response[i].description"</td></tr>");
// The line above is giving me the
// syntax error , i cant figure out what's wrong
});
}
});
这是 PHP 脚本传递的 JSON 对象
$data[]=array("code"=>$code,"title"=>$title,"lecturer"=>$lecturer,"description"=>$description);
我花了 1 小时调试,但找不到语法错误。你们能帮帮我吗?