jQuery AJAX - 状态已取消

时间:2013-04-02 19:23:34

标签: jquery post

当我尝试在托管上执行此请求时,它会被取消,但它适用于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');

                });
        });

0 个答案:

没有答案