亚洲乱码中文字幕综合,中国熟女仑乱hd,亚洲精品乱拍国产一区二区三区,一本大道卡一卡二卡三乱码全集资源,又粗又黄又硬又爽的免费视频

asp.net中js和jquery調(diào)用ashx的不同方法分享

 更新時間:2013年06月07日 11:21:31   作者:  
asp.net中js和jquery調(diào)用ashx的不同方法分享,需要的朋友可以參考一下
=============js================
復(fù)制代碼 代碼如下:

var xhr = new XMLHttpRequest();
            xhr.open("get", 'Controls/gengCart.ashx?CartID=' + input + '&count=' + inp, true);
            xhr.setRequestHeader("If-Modified-Since", "0");
            xhr.onreadystatechange = function () {
                if (xhr.readyState == 4 && xhr.status == 200) {
                    var result = xhr.responseText;
                    var json = eval("(" + result + ")");
                    alert(js.name);
                }
            };
            xhr.send(null);

============jquery=====================
復(fù)制代碼 代碼如下:

  $.post('Controls/Cart.ashx', { "productID":<%= GetID %>,"count":"1","userID":'<%= uid %>' }, function (data,statu) {
                if (statu == 'success') {
                   if(data=="false"){
                      alert("請登錄后再進行此操作");
                   }
                   else{
                      window.location="gwc.aspx?uid="+'<%= uid%>';
                   }
                }
            })

相關(guān)文章

最新評論