<div class="codetitle"> <span><a style="CURSOR: pointer" data="40858" class="copybut" id="copybut40858" onclick="doCopy('code40858')"><u>複製程式碼</u></a></span>程式碼如下:</div> <div class="codebody" id="code40858"> <br> <br> <input type="text" id="Tb_Set_Time" size="10" width="200" value="2014-11-12"> <br> <br><br><input type="button" id="d523_ss" size="3" onclick="pickedFunc()"> 秒<br><br><script src="jquery.min.js"></script> <br> <br>function pickFunc() { <br><br>var date1 = Date.parse($( '#Tb_Set_Time').val()); <br><br>var date2 = Date.parse($('#Tb_End_Time').val()); <br><br>var diffDays = (日期2 -日期1) / 3600 / 1000 / 24; <br><br>警報(diffDays); <br>} <br>腳本> <br>身體> <br> <br>腳本> <br>身體> </div>