怎么理解推迟2小时啊
<!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>日期对象 </title> <script type="text/javascript"> var mydate=new Date(); document.write("当前时间:"+mydate+"<br>"); mydate.setTime(mydate.getTime() + 2* 60 * 60 * 1000); document.write("推迟二小时时间:" + mydate); </script> </head> <body> </body> </html>
输出结果
当前时间:Thu Oct 20 2016 15:16:27 GMT+0800
推迟二小时时间:Thu Oct 20 2016 17:16:27 GMT+0800