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

jquery取元素值

时间:2015-06-04 11:09:06      阅读:125      评论:0      收藏:0      [点我收藏+]

标签:

var j = 1;
if (rows.length > 0) {
for (var i = 0; i < rows.length; i++) {
var row = rows[i];
id += row.CommodityID + ","; //商品ID
var n = parseInt(db) * parseInt($("input[name=‘cminNum‘]").eq(row.Seq).val()); //最小数量
allnum = parseInt(allnum) + parseInt($("input[name=‘cminNum‘]").eq(row.Seq).val()); //总数量累计

// 金额
var s = parseInt(db) * parseInt($("td[field=‘Price‘]>div").eq(row.Seq + 1).html()) * n; //最小金额
allsum = parseInt(allsum) + parseInt($("td[field=‘Price‘]>div").eq(row.Seq + 1).html()) * n; //总金额累计


nums += n + ","; //每个商品数量分割
minnum = row.CommodityMinNum; //商品最小数量
maxnum = row.CommodityMaxNum; //商品最大数量

// 金额
minsum = row.CommodityMinSum; //商品最小金额
maxsum = row.CommodityMaxSum; //商品最大金额

j += i;
if (parseInt(row.Num) < parseInt(allnum)) {
alert(row.CommodityName + ":商品库存不足!");
}
}

jquery取元素值

标签:

原文地址:http://www.cnblogs.com/honghong75042/p/4551232.html

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