jQuery Ajax响应无法在safari中工作..但是在其他浏览器中工作正常..这里有什么错误? [英] Jquery Ajax responce not working in safari..but other browser it is work fine..what is mistake here?
本文介绍了jQuery Ajax响应无法在safari中工作..但是在其他浏览器中工作正常..这里有什么错误?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
$.ajax({
url:'ajax.php?action=wordFind&word='+arrString,
cache: true,
type: "GET",
success:function(res){
if(res=="find") { }
}
});
推荐答案
$.ajax({
url:'ajax.php?action=wordFind&word='+arrString,
cache: true,
async:false,
dataType:html,//If the response is json replace it with "json"
type: "GET",
success:function(res){
console.log(res);//To check you are getting any reponse
if(res=="find")
{
//Do the stuff you want.
}
}
});
这篇关于jQuery Ajax响应无法在safari中工作..但是在其他浏览器中工作正常..这里有什么错误?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文