jquery ajax的浏览器兼容问题 大神求救啊

h420943302 h420943302 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
jquery用的是jquery-1.7.1.min.js
function delete_article(id){	
$.post('__URL__/delete',{article_id:id},function(val){
if(val==1){
$('#count').html($('#count').html()-1);
$('#article'+id).remove();
}else if(val==2){
alert("删除失败");
}
});
}

这段在ie和火狐都能正常 ,但在 google浏览器就不正常,服务器端能正常返回数据
function edit_article(n,id){	
switch(n){
case "1":
$.getJSON("__URL__/shenhe",{article_id:id},function(json){
if(json.status==1){
var html="<img src=\"{:aout_image(2)}\" onclick=\"edit_article('2','"+id+"');\" title=\"{:aout(2)}\" />";
$("#edit"+id).html(html);
}else if(json.status==5){
alert(json.info);
var html="<img src=\"{:aout_image("+json.data+")}\" onclick=\"edit_article('"+json.data+"','"+id+"');\" title=\"{:aout("+json.data+")}\" />";
$("#edit"+id).html(html);
}else{
//alert(json.info);
alert(json.info);
}
});
break;
case "2":
if({:getuserinfo("manage")}=={:C("AUDITOR")}){
return false;
}
$.getJSON("__URL__/caina",{article_id:id},function(json){
if(json.status==1){
var html="<img src=\"{:aout_image(3)}\" onclick=\"edit_article('3','"+id+"');\" title=\"{:aout(3)}\" />";
$("#edit"+id).html(html);
}else{
alert(json.info);
}

});
break;
}
}
function yuan_article(id){
//alert("正在检测,请稍后...");
showd();
$.getJSON("__URL__/yuanchuang",{article_id:id},function(json){
hiddend();
if(json.status==1){
alert(json.info);
}else{
$('#count').html($('#count').html()-1);
$('#article'+id).remove();
alert(json.info);
}
});
}

这个就是只有火狐能正常反应,ie和google浏览器 不行,也是服务器端能正常返回数据
都是 能正常进入ajax中 去服务器端调用代码 获取数据,但是就是不能正常进入 接下去的操作
...全文

相关推荐

评论 5
收藏 已收藏
分享
返回顶部
h420943302
Ajax 52,778 成员 25,334 内容