jQuery的AJAX并不在IE浏览器浏览器、jQuery、AJAX、IE

由网友(我拿她当命她当我有病)分享简介:我有以下函​​数添加了一篇文章我的购物篮:$(。addtocart)。点击(函数(){。变种产品= $(#PID)VAL();变种数量= $(#数量)VAL()。如果(isNaN(数量)||数量=='')警报(ERROR);其他{警报(HIHI);$阿贾克斯({类型:后,网址:的index.php数据:页= AJAX和...

我有以下函​​数添加了一篇文章我的购物篮:

  $(。addtocart)。点击(函数(){

   。变种产品= $(#PID)VAL();
   变种数量= $(#数量)VAL()。
   如果(isNaN(数量)||数量=='')警报(ERROR);
   其他{
        警报(HIHI);

        $阿贾克斯({
            类型:后,
            网址:的index.php
            数据:页= AJAX和放大器;行动= add_product和放大器;产品=+产品+&放大器;数量=+数量,
            成功:函数(HTML){
                警报(AAA);
                / *
                $(#maininf)HTML($(#thumbimg)HTML());
                $(#TINFO)HTML(HTML);
                变种leftPoint =(Fensterweite() -  $(readybuy。)宽()。)/ 2;
                $(readybuy。)的CSS(左,leftPoint)。
                $(的Glassbox。)淡入()。
                $(。readybuy)淡入();
                * /
            },
        });
   }
 

第一个警报阿灵每次在IE浏览器。 该beforeSend步骤是工作压力太大。 但是第二次警报是永远不会到来。 有没有人一个想法,为什么它不能在IE浏览器?

感谢。

解决方案

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

jquery 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
    });
}

阅读全文

相关推荐

最新文章