<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title> New Document </title> <meta name="Generator" content="EditPlus"> <meta name="Author" content="DAYU"> <meta name="Keywords" content=""> <meta name="Description" content=""> </head><body> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title> New Document </title> <meta name="Generator" content="EditPlus"> <meta name="Author" content="DAYU"> <meta name="Keywords" content=""> <meta name="Description" content=""> </head> <?=date_default_timezone_set("Asia/Shanghai");?><!-- 这里会输出1先不管 --> <?php //3天后的时间 $d =strtotime('+3 days'); $threeday=date('Y-m-d H:i:s',$d); ?> <script language="javascript"> function countdown(endtime, today) { //today = new Date(); //var testDate = new Date(); //today = new Date(); //target_time=new Date(endtime); testDate = new Date(); today = testDate.format("yyyy-MM-dd hh |
发布评论
评论(3)
用firefox 或 IE 的F12调试一下
比较两个时间的差值
别这么蛋疼写一堆了用
http://momentjs.com/吧