Javascript method to calculate how many days you have lived: first define your birthday; then pass "parseInt((today.getTime()-birthday.getTime())/(1000*3600*24));" The method is to calculate how many days you have lived.
The operating environment of this article: windows7 system, javascript version 1.8.5, DELL G3 computer
javascript method to calculate how many days you have been alive
Calculate how many days you have lived from birth to today and how old you are this year
The code is as follows:
Recommended study: "javascript Advanced Tutorial"
The above is the detailed content of javascript calculate how many days you have lived. For more information, please follow other related articles on the PHP Chinese website!