请将这段VBscript转换成Javascript代码
m = DateDiff("m", Birth, ToDay)
If Day(ToDay) < Day(Birth) Then m = m -1
Birth = DateAdd("m", m, Birth)
d = DateDiff("d", Birth, ToDay)
If hour(ToDay) < hour(Birth) Then d = d -1
Birth = DateAdd("d", d, Birth)
moTime = setInterval("returnBirth()",1000)
只是代码片段,只需要一行一行转换成Javascript代码就行了
------解决方案--------------------
另外你可以参考
JavaScript版的DateAdd、DateDiff、IsDate函数
http://bbs.51js.com/thread-75992-1-1.html
http://0e2.net/post/1599.html
http://www.aspxhome.com/javascript/skills/20081/292130.htm