为什么请求数据成功,返回客户端的却是undefined?
$(document).ready(function(){
$("#serchBtn").click(function(){
$.ajax({
type:"GET",
url:"serverjson.php?number=" + $("#keyword").val(),
datatype:"json",
success:function(data){
if(data.success){
$("#serchResult").html(data.msg);
}else{
$("#serchResult").html("出现错误:" + data.msg);
}
},
error:function(jqXHR){
alert("发生错误" + jqXHR.status)
}
})
});