码迷,mamicode.com
首页 > Web开发 > 详细

ajax

时间:2017-11-30 13:37:56      阅读:178      评论:0      收藏:0      [点我收藏+]

标签:get   scan   handle   nbsp   post   codec   bsp   idt   cti   

1.有参数

 1)form表单

  $.ajax({
                            url: "Handle/OrderData.ashx?action=ScanCodeConfirm",
                            type: "post",
                            data: $("#form1").serialize() ,
                            dataType: "json",
                            success: function (data) {
                                if (data.success) {


                                }
                                else {
                           
                                }
                            }
                        });

2)

 $.ajax({
                            url: "Handle/OrderData.ashx?action=ScanCodeConfirm",
                            type: "post",
                            data: g_pieces=" + g_pieces + "&g_length=" + g_length + "&g_width=" + g_width + "&g_hight=" + g_hight + "&g_weight=" + g_weight + "&g_goodsId=" + g_goodsId,
                            dataType: "json",
                            success: function (data) {
                                if (data.success) {

                                 
                                }
                                else {
                                 
                                }
                            }
                        });

3) 

$.ajax({
                url: "/Handle/OrderData.ashx?action=RecSendUserInfo",
                type: "post",
                data:{countryID:countryID},
                dataType: "json",
                success: function (data) {
                    if (data.success) {
                    
                    }
                    else {
                    }
                }
            });

2.无参数

 function rec_iinfo()
        {
            $.ajax({
                url: "Handle/OrderData.ashx?action=getRec",
                type: "post",
                dataType: "json",
                success: function (data) {
                    if (data.success) {
                      
                    }
                }
            });
        }

 

ajax

标签:get   scan   handle   nbsp   post   codec   bsp   idt   cti   

原文地址:http://www.cnblogs.com/mff520mff/p/7928223.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!