javascript根据生日计算年龄
2013-06-24 03:49
274 查看
var birthday=new Date("1989-06-25".replace(/-/g, "\/")); var d=new Date(); var age = d.getFullYear()-birthday.getFullYear()-((d.getMonth()<birthday.getMonth()|| d.getMonth()==birthday.getMonth() && d.getDate()<birthday.getDate())?1:0); alert(age);http://hi.baidu.com/liuspring/item/bd1509cf2d1cff16b77a2402
相关文章推荐
- javascript根据生日计算年龄
- 根据生日计算年龄
- asp.net根据生日计算年龄(具体到年月天)
- sql 语句 根据顾客生日计算 顾客年龄
- java根据生日计算年龄工具类
- mysql 年龄计算(根据生日字段)
- 新手学习:根据生日计算当前年龄
- jQuery实现根据生日计算年龄 星座 生肖
- MySQL根据生日计算年龄
- 根据生日计算年龄
- 根据生日计算年龄
- mysql 年龄计算(根据生日)
- 根据生日计算年龄
- java根据用户生日计算年龄
- 根据生日计算年龄
- 问题:oracle 计算年龄;结果:oracle中根据生日计算年龄的问题
- 根据生日计算年龄
- 根据用户生日计算年龄
- javascript根据日期计算年龄