// Get the start date
var startdate=document.all.startdate.value;
// Convert to date format
startdate=startdate.replace (/-/ g, "/");
// Get the end date
var enddate=document.all.enddate.value;
enddate=enddate.replace (/-/ g, "/");
// If the start date is greater than the end date
if (date.parse (startdate) -date.parse (enddate)>0) {
 alert ("The start date must be before the end date!");
 // return false
 return false;
  • Previous Js logic judgment for ip address, subnet mask, gateway
  • Next Detailed jQuery Mobile custom tags