以下内容如下:
var a = new Date(2012,1,1);
alert(a);
alert(a.getSeconds());
a = new Date(a.getTime() + (180 * 1000)); // adds 3 seconds.
alert(a);
alert(a.getSeconds()); 成果:
2012年2月1日星期三00:00:00 GMT-0200 (Horário brasileiro de ver o) 0 2012年2月1日星期三00:03:00 GMT-0200 (Horário brasileiro de ver o)
我的3秒呢?
发布于 2012-10-05 02:35:35
你只需要3分钟,而不是3秒。
变化
a = new Date(a.getTime() + (180 * 1000)); // adds 3 seconds.至
a = new Date(a.getTime() + (3 * 1000)); // adds 3 seconds.https://stackoverflow.com/questions/12738715
复制相似问题