Home > Web Front-end > JS Tutorial > JS simple sample code to compare two time sizes_javascript skills

JS simple sample code to compare two time sizes_javascript skills

WBOY
Release: 2016-05-16 17:08:01
Original
1103 people have browsed it
As shown below:
Copy the codeThe code is as follows:

if ( New date (strsd.replace (/-/g, '/')) & gt; new date (stred.replace (/-/g, '/')) {// The start time is greater than the end time
alert ("Time selection is wrong! The start date must be less than or equal to the end period!");
Return false;
}
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