|
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"><html><head><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /><title>Untitled Document</title><script language="JavaScript">function demo(){var strDate = "2008-11-01";var s=strDate.split("-"); var date=new Date(parseInt(s[0]),parseInt(s[1])-1,parseInt(s[2])); date.setHours("12");date.setMinutes("40");var firstTime2 = new Date(parseInt(s[0]),parseInt(s[1])-1,parseInt(s[2])); firstTime2.setHours("12");firstTime2.setMinutes("30");alert("aaaaa>>" +date.toLocaleString());alert("bbbb>>" +firstTime2.toLocaleString());if(date>firstTime2){alert("false");}else{alert("true");}}</script></head><body ><input type="button" name="demo" ></body></html> |
|