标签:date() var 结束 指定 cti mat time orm today
方法函数:
function FormatDate (strTime) { var date = new Date(strTime); return date.getFullYear()+"-"+(date.getMonth()+1)+"-"+date.getDate(); }
调用方法:
var today = new Date(); var today_time = FormatDate(today); if(today_time>‘2018-4-25‘){ alert(‘活动已结束‘); return false; }
标签:date() var 结束 指定 cti mat time orm today
原文地址:https://www.cnblogs.com/gushengyan/p/8947815.html