javascript比較日期

var myDate=new Date();
myDate.setFullYear(2008,8,9);

var today = new Date();

if (myDate>today)
{
alert("Today is before 9th August 2008");
}
else
{
alert("Today is after 9th August 2008");
}
http://www.w3school.com.cn/js/js_obj_date.asp

留言

這個網誌中的熱門文章

台灣政府組織圖 -2026 gemini整理

網頁前端框架的歷史時間軸 - 2026 gemini整理