请看下面的代码:
$('a.load').click(function(){
setTimeout(function(){
$(".content_container").append('<div class="preloading"><img src="http://localhost:8888/smart/assets/images/loading.gif" alt="loading" /></div>').show();
var url = 'http://localhost:8888/smart/payments.html';
$.post(url,function(data){
$('.content_container').append(data).show();
$('.preloading').remove();
});
},1000);
});问题是它不返回所需的url,只返回加载的图像,它只是html页面。
发布于 2012-10-21 10:18:03
我看到你引用的是localhost:8888,你是在同一个域上运行上面的代码吗?如果你不是,那么我怀疑你是Same origin policy的牺牲品
https://stackoverflow.com/questions/12994279
复制相似问题