Home > Web Front-end > JS Tutorial > js date comparison related days code_javascript skills

js date comparison related days code_javascript skills

WBOY
Release: 2016-05-16 16:53:46
Original
1053 people have browsed it
复制代码 代码如下:









<script> <br>function pickedFunc() { <br><br>var date1 = Date.parse($('#Tb_Set_Time').val()); <br><br>var date2 = Date.parse($('#Tb_End_Time').val()); <br><br>var diffDays = (date2 - date1) / 3600 / 1000 / 24; <br><br>alert(diffDays); <br>} <br></script>


Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template