首页商品计时信息不显示-代码显示语法错误,求高人解决
2016-07-07 15:11 来源:www.chinab4c.com 作者:ecshop专家
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <!-- {if $promotion_goods} --> <script type="text/javascript"> var Tday = new Array(); var daysms = 24 * 60 * 60 * 1000 var hoursms = 60 * 60 * 1000 var Secondms = 60 * 1000 var microsecond = 1000 var DifferHour = -1 var DifferMinute = -1 var DifferSecond = -1 function clock(key) { var time = new Date() var hour = time.getHours() var minute = time.getMinutes() var second = time.getSeconds() var timevalue = ""+((hour > 12) ? hour-12:hour) timevalue +=((minute < 10) ? ":0":":")+minute timevalue +=((second < 10) ? ":0":":")+second timevalue +=((hour >12 ) ? " PM":" AM") var convertHour = DifferHour var convertMinute = DifferMinute var convertSecond = DifferSecond var Diffms = Tday[key].getTime() - time.getTime() DifferHour = Math.floor(Diffms / daysms) Diffms -= DifferHour * daysms DifferMinute = Math.floor(Diffms / hoursms) Diffms -= DifferMinute * hoursms DifferSecond = Math.floor(Diffms / Secondms) Diffms -= DifferSecond * Secondms var dSecs = Math.floor(Diffms / microsecond) if(convertHour != DifferHour) a=""+DifferHour+"天"; if(convertMinute != DifferMinute) b=""+DifferMinute+"时"; if(convertSecond != DifferSecond) c=""+DifferSecond+"分" d=""+dSecs+"秒" if (DifferHour>0) {a=a} else {a=''} document.getElementById("leftTime"+key).innerHTML = a + b + c + d; //显示倒计时信息 } </script> <!-- 促销商品--> <!--{foreach from=$promotion_goods key=key item=goods name="promotion_foreach"}--> <li> <a href="{$goods.url}" class="pro_img" target="_blank"><img src="{$goods.thumb}" alt="{$goods.name|escape:html}"></a> <a href="{$goods.url}" title="{$goods.name|escape:html}" class="pro_name">{$goods.name|escape:html}</a> <p class="tl"><strong>{$goods.promote_price}</strong><del>{$goods.market_price}</del></p> <p class="last_time">剩余<span id="leftTime{$smarty.foreach.promotion_foreach.index}"></span></p> </li> <script> 在DW里面老提示 53行语法错误也就是这个Tday[{$key}] = new Date("{$goods.gmt_end_time}"); 在首页就这样显示 根本就不显示天数什么的 求高人帮帮忙! |
回答:
没有高手在吗帮忙解决下!!另有感谢。。。。 |
对这个不是很清楚 |
坛子里没有能搞定的人吗 可以报酬的大侠们 |
最近更新
常用插件
- ecshop二次商品订购人信息
ecshop二次商品订购人信息填写插件,有时候给朋友送花,或者是送礼品的...
- ecshop会员中心订单excel倒出
ecshop会员中心订单excel倒出...
- ecshop二次开发商品购买备
ecshop销售统计 插件介绍:ecshop二次开发订单销售统计和商品购买备注服...
- ecshop注册推荐送现金插件
ecshop中的促销售功能还不是很完善,随着电子商务系统的发展和进步,...
- ecshop2.7.2退换货申请插件
ecshop2.7.2退换货申请插件,主要是在 ecshop 现在的基础上,对ecshop的订单处...
ecshop热门问答
ecshop热门资料
ecshop网页空间
ecshop促销插件
ecshop自主
ecshopMALLCOOL
时尚起义2014
ecshop隐秘
ecshop虚拟服务器
美丽说模板
ecshoperror
ecshop导航栏背景色
ecshop网络
ecshop復選屬性
ecshop重庆
ecshop品牌列表
成果cps接口
ecshop夺宝网
ecshopDVBBS
ecshop名品
ecmall会员等级
ecshop讲座
邀请返利
ecshop保持登陆
ecshopimport
ecshop-Power
ecshop统计图标
uchome栏目权限
ecshop中毒
ecshop版权信息
ecshop奏效
ecshoplamiu