且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

jQuery的AJAX并不在IE浏览器

更新时间:2022-12-14 23:24:43

  $(readybuy。)淡入()。
            * /
        }< - 额外的逗号将打破IE
    });
}
 

i have the following function to add an article in my basket:

$(".addtocart").click(function(){

   var product = $("#pid").val();
   var qty = $("#qty").val();
   if(isNaN(qty) || qty == '') alert("ERROR");
   else{                                    
        alert("HIHI");

        $.ajax({
            type:"post",
            url:"index.php",
            data:"page=ajax&action=add_product&product=" + product + "&qty=" + qty,
            success: function(html){
                alert("AAA");
                /*
                $("#maininf").html($("#thumbimg").html());
                $("#tinfo").html(html);
                var leftPoint = (Fensterweite()-$(".readybuy").width())/2;
                $(".readybuy").css("left",leftPoint);
                $(".glassbox").fadeIn();
                $(".readybuy").fadeIn();
                */
            },
        });
   }

the first alert is alling everytime in IE. the beforeSend Step is working too. But the second alert is never coming. Has anybody an idea why it doesn't work on IE?

Thanks.

            $(".readybuy").fadeIn();
            */
        },  < - Extra comma will break IE
    });
}