当我尝试在托管上执行此请求时,它会被取消,但它适用于localhost,哪里有问题?
$(".cover_image").click(function() {
var imgid = $(this).attr('title');
var dataString =
'&imgid=' + imgid;
$.ajax({
type: "POST",
url: baseUrl + "welcome/cover",
async: true,
data: dataString,
success: function(msg) {
window.location.href = 'http://www.facebook.com/profile.php?preview_cover='+ msg;
// $("#loading").css('visibility', 'hidden');
},
beforeSend: function () {
$("#loading").css('visibility', 'visible');
}
}).done(function () {
$("#loading").css('visibility', 'hidden');
});
});