我試試這個代碼如何減去jQuery中的時隙?
start_time = '08:15 AM'
end_time = '03:45 PM'
diff = end_time - start_time;
只是我想在jQuery中減去時間。我已經在php中嘗試過,如下所示,它運行正常。 但不是在jQuery的
$st = strtotime("07:30 AM");
$edt = strtotime("06:15 AM");
echo round(abs($st - $edt)/60,2). " minute";
echo "<br>";
echo $timediff=($edt-$st)/60;
是什麼讓你覺得這將遠程工作,或與jQuery有什麼關係? – 2012-08-08 13:10:04
還有就是類似的問題在這裏 http://stackoverflow.com/questions/2053057/doing-time-subtraction-with-jquery – Ravi 2012-08-08 13:11:30