<div class="codetitle"> <span><a style="CURSOR: pointer" data="6950" class="copybut" id="copybut6950" onclick="doCopy('code6950')"><u>复制代码</u></a></span> 代码如下:</div> <div class="codebody" id="code6950"> <br>var time1="2010-11-01 10:12:12"; <br>var time2="2010-11-01 11:12:12"; <br><br>var t1=new Date(time1.replace(/-/g, '/')); <br>var t2=new Date(time2.replace(/-/g, '/')); <br><br>alert((t2-t1).toString()=="3600000"?"yes":"no"); <br> </div>