Ad Code

HTML Age Calculator Source Code

Advertisements

 HTML Age Calculator Source Code: In this post, we are sharing HTML Age Calculator Source Code. 

Code:  

<html>
    <head>
    <title> The Age Calculator</title>
    </head>
<body>
    <script language="JavaScript">
function CalculateAge()
{
var birthyear = document.form1.txt.value;
var currentyear  = new Date();
var age   = currentyear.getFullYear();
document.write('They are either ' + (age-birthyear)+ ' or ' + (age-

birthyear - 1));
 }
    </script>
        <form name=form1>
            Enter the Birth Year
           <input type="text" name="txt" size=10>
           <br>
           <input type="button" value="Calculate" onClick='CalculateAge

();'>  
        </form> 
</body>
</html>


 OutPut

Download Link
Advertisements

Post a Comment

1 Comments

  1. (Best Online Age Calculator) Calculate your exact age in details like years, months, days just by your date of birth

    ReplyDelete
Emoji
(y)
:)
:(
hihi
:-)
:D
=D
:-d
;(
;-(
@-)
:P
:o
:>)
(o)
:p
(p)
:-s
(m)
8-)
:-t
:-b
b-(
:-#
=p~
x-)
(k)