方法一:
1.复制以下JS代码,添加到 js/common.js 的最后
function cart_number(txt_id, type, num)
{ num = num || 1;
var txt = document.getElementByIdx_x_x(txt_id);
var source_num = parseInt(txt.value);
if (source_num == 1 && type == '-')
{
alert('请最少购买一个商品');
return;
}
var to_num = source_num;
if (type == '+')
{
to_num += num;
}
else if (type == '-')
{
to_num -= num;
}
txt.value = to_num;
showdiv(txt);
}
2.在flow.dwt中找到购买数量的文本框,在他的前后分别加上
-
+
方法二:
在flow.dwt中找到购买数量的文本框,在他的前后分别加上

|
|