0

我有一个关于 MVC 控制器的 jQuery 帖子。该调用在 Firefox 和 Chrome 中运行良好,但使用 IE 时对象属性为空?

知道是什么导致了 Internet Explorer

            var orderModel =
            {
                FirstName: this.address['name_first'],
                Surname: this.address['name_last'],
                Amount: this.finalTotal,
                Line1: this.address['line1'],
                Line2: this.address['line2'],
                City: this.address['city'],
                Code: this.address['code'],
                Region: this.address['region'],
                Country: this.address['country'],
                Shipping: shippingCost,
                Phone: this.address['phone'],
                EmailAddress: this.address['email_address'],
                OrderItems: items2
            };
        var form;
        $.ajaxSetup({ 'async': false });
        $.ajaxSetup({ cache: false });
        $.ajax({
            type: "POST",
            contentType: "application/json; charset=utf-8",
            url: this.url,
            data: JSON.stringify(orderModel),
            dataType: "json",
            success: function(response) {
                // Process result...
            }
        });

    [HttpPost]
    public ActionResult AddPurchaseDetails(OrderModel order)
    {
        //DO Something...
     }
4

0 回答 0