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

js date comparison related days code_javascript skills

WBOY
WBOYOriginal
2016-05-16 16:53:461079browse
复制代码 代码如下:









<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>


Statement:
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