当前位置: 代码迷 >> ASP.NET >> asp.net jquery ajax 取返回值并处理 .
  详细解决方案

asp.net jquery ajax 取返回值并处理 .

热度:6329   发布时间:2013-02-25 00:00:00.0
asp.net jquery ajax 取返回值并处理 .............................................在线等

$.ajax({
                    type: "Post",
                    url: "bannerCalling.aspx/updateISelfBanner",
                    data: "{'bannerValue':'"+bannerValue+"'}",
                    contentType: "application/json; charset=utf-8",
                    dataType: "html",
                    success: function(getValues) 
                    {
                        alert(getValues);
                        $("#igoods")(getValues); 
                    },
                    error: function(err) 
                    {
                        alert(err);
                    }
                });  


其中:alert(getValues);值为:

"{"d":"\u003cdiv class=\"igoods-list\"\u003e                                        \u003cdiv class=\"ichild\"\u003e                                            \u003cdiv class=\"igoods-img\"\u003e                                                \u003ca href=\"#\"\u003e                                                    \u003cimg src=\"../../../clientWeb/hellenren/IMAGE/bannerImg/1.1.2.png\" /\u003e\u003c/a\u003e\u003c/div\u003e                                            \u003cdiv class=\"clear-b\"\u003e                                            \u003c/div\u003e                                            \u003ca href=\"javascript:void(0);\" onclick=\"addToCard(this,\u0027iSelf\u0027);\" class=\"igoods-add\"\u003e                                            \u003c/a\u003e                                        \u003c/div\u003e                                    \u003c/div\u003e\u003cdiv class=\"igoods-list\"\u003e                                        \u003cdiv class=\"ichild\"\u003e                                            \u003cdiv class=\"igoods-img\"\u003e                                                \u003ca href=\"#\"\u003e                                                    \u003cimg src=\"../../../clientWeb/hellenren/IMAGE/bannerImg/1.1.3.png\" /\u003e\u003c/a\u003e\u003c/div\u003e                                            \u003cdiv class=\"clear-b\"\u003e                                            \u003c/div\u003e                                            \u003ca href=\"javascript:void(0);\" onclick=\"addToCard(this,\u0027iSelf\u0027);\" class=\"igoods-add\"\u003e                                            \u003c/a\u003e                                        \u003c/div\u003e                                    \u003c/div\u003e\u003cdiv class=\"igoods-list\"\u003e                                        \u003cdiv class=\"ichild\"\u003e                                            \u003cdiv class=\"igoods-img\"\u003e                                                \u003ca href=\"#\"\u003e                                                    \u003cimg src=\"../../../clientWeb/hellenren/IMAGE/bannerImg/1.2.1.png\" /\u003e\u003c/a\u003e\u003c/div\u003e 
  相关解决方案