下面是一个完事的函数:
复制代码 代码如下:
function ReLoadPromotion() {
var A = parseFloat($("#pNormalTotal").html()) + parseFloat($("#pBarginTotal").html());
jQuery.ajax(
{
url: "/ajax/OrderRedemption.aspx?vf=getlist",
type: "POST",
dataType: "json",
data:{amount:A},
success: function (json) {
$("#fittingProductList tr.tableItem").remove();
var data = json.list;
$.each(data, function (i, n) {
var id = n.pid;
var row = "<tr id=/"trPromotin" + id + "/" class=/"tableItem/">";
row += "<td><input id=/"cbPromotionItem" + id + "/" type=/"checkbox/" value=/"" + n.pid + "/" name=/"promotionProduct/" + n.price + "/" onclick=/"CalculateOrder()/" /></td>";
row += "<td><label for=/"cbPromotionItem" + id + "/">" + n.pname + "</label></td>";
row += "<td>满" + n.amount + "</td>";
row += "<td>" + n.price + "</td>";
row += "</tr>";
$("#fittingProductList").append(row);
});
$("#promotionArea").slideDown();
CalculateOrder();
},
error: function (xml) {
//alert(arguments[1]);
var json = eval("(" + xml.responseText + ")");
$("#promotionArea").slideUp();
}
});
}
新闻热点
疑难解答
图片精选