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").html(getValues);
},
error: function(err)
{
alert(err);
}
});
"{"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
var obj=eval('('+getValues+')');
$("#igoods").html(obj.d);