查看: 3024|回复: 1

[求代码] ASP到期时间怎么读取操作?

[复制链接]
阿航 发表于 2015-3-14 14:05:13 | 显示全部楼层 |阅读模式
字段:
产品名称  到时时间

QQ图片20150314140133.png 我目前只能读取一个,不知道后面的怎么才能读出来!


tg_ns =到期时间


倒计时:
jS

<script type="text/javascript">
window.onload=function(){
abc();
}
function abc(){
var d=new Date(<%=(Recordset1.Fields.Item("tg_ns").Value)%>);//示例:2016,10,1  2016年10月 1日
var today=new Date();
var time=d.getTime()-today.getTime();
var 天=Math.floor(time/(1000*60*60*24));
var 小时=Math.floor(time/(1000*60*60))%24;
var 分=Math.floor(time/(1000*60))%60;
var 秒=Math.floor(time/1000)%60;
//var abcInner=document.createTextNode(天+'天'+小时+'小时'+分+'分'+秒+'秒');
var 时间=document.getElementById('a');
时间.innerHTML=天+'天'+小时+'小时'+分+'分'+秒+'秒';
if(Math.floor(time)<0){
时间.innerHTML='已经过期';
}
//document.getElementById('a').appendChild(abcInner);
}
setInterval('abc()',1000);
</script>
ttasp 发表于 2015-3-17 11:55:27 | 显示全部楼层
字段:
产品名称  到时时间

我目前只能读取一个,不知道后面的怎么才能读出来!


tg_ns =到期时间
...
阿航 发表于 2015-3-14 14:05


循环不就可以了,JS给不同的ID赋值
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

在线客服

售前咨询
售后咨询
服务热线
023-58418553
微信公众号