轻源码

  • QingYuanMa.com
  • 全球最大的互联网技术和资源下载平台
搜索
一起源码网 门户 ECShop网店 查看主题

ECSHOP购物车结算页面购买数量加减按钮

发布者: windpop | 发布时间: 2018-6-5 09:42| 查看数: 5694| 评论数: 1|帖子模式


方法一:
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中找到购买数量的文本框,在他的前后分别加上

  



最新评论

ronghua78 发表于 2022-6-22 18:01
波士顿动力编程教程

轻源码让程序更轻更快

QingYuanMa.com

工作时间 周一至周六 8:00-17:30

侵权处理

客服QQ点击咨询

关注抖音号

定期抽VIP

Copyright © 2016-2021 https://www.171739.xyz/ 滇ICP备13200218号

快速回复 返回顶部 返回列表