Skip to content

Instantly share code, notes, and snippets.

View Ashvith07's full-sized avatar

Ashvith Ashvith07

View GitHub Profile
<html>
<head> <title> Presentation</title>
<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));
}
<html>
<head>
<title> The Age Calculator</title>
</head>
<body>
<script language="JavaScript">
function CalculateAge()
{
var birthyear = document.form1.txt.value;
var currentyear = new Date();
<html>
<head>
<title> The Age Calculator</title>
</head>
<body>
<script language="JavaScript">
function CalculateAge()
{
var birthyear = document.form1.txt.value;
var currentyear = new Date();