js 中Date类型一些运算
时间:2010-12-21 来源:ajin
1 var limitationOfExpired =new Date(dateIssue.getFullYear(),dateIssue.getMonth(),dateIssue.getDate());//make year month date same with dateissue
2 limitationOfExpired.setFullYear(dateIssue.getFullYear() + 1);
2 alert("有效日期最多一年!");
3
4 if (dateExired <dateIssue)
5 alert("有效期不能小于发证日期");
//same with:
var date=Date();
2 limitationOfExpired.setFullYear(dateIssue.getFullYear() + 1);
3.比较
2 alert("有效日期最多一年!");
3
4 if (dateExired <dateIssue)
5 alert("有效期不能小于发证日期");
4.
//same with:
var date=Date();
相关阅读 更多 +
- 系统休眠文件删除后果 如何删除计算机的休眠文件 2025-04-22
- 站群服务器是什么意思 站群服务器的作用 站群服务器和普通服务器的区别 2025-04-22
- jQuery插件有何作用 jQuery插件的使用方法 2025-04-22
- jQuery插件有哪些种类 简单的jQuery插件实例 2025-04-22
-