Home > Web Front-end > JS Tutorial > body text

javascript calculate how many days you have lived

藏色散人
Release: 2023-01-07 11:41:32
Original
3307 people have browsed it

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.

javascript 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:

Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!