Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
<script type="text/javascript">
var myVarYear = '';
var h1 = document.getElementById('myspecialheading');
h1.innerHTML = myVarYear;
</script>
<html>
<head>
<title>Change Date</title>
<script type="text/javascript">
function fnChangeDate() {
var mydate = new Date();
var year = mydate.getFullYear();
var h1 = document.getElementById("putyear");
h1.innerHTML = year;
}
</script>
</head>
<body onload="fnChangeDate()">
<h1 id="putyear">Heading</h1>
<body>
</html>
<html>
<head>
<title>
Change Date
</title>
<script type="text/javascript">
[tab]function fnChangeDate() {
[tab][tab]var mydate = new Date();
[tab][tab]var day = mydate.getDay();
[tab][tab]var month = mydate.getDate();
[tab][tab]var year = mydate.getFullYear();
[tab][tab]var hours = mydate.getHours();
[tab][tab]var minutes = mydate.getMinutes();
[tab][tab]var millisecs = mydate.getMillseconds();
[tab][tab]var h1 = document.getElementById("putyear");
[tab][tab]h1.innerHTML = year;
[tab]}
</script>
</head>
<body onload="fnChangeDate()">
<h1 id="putyear">
Heading
</h1>
</body>
</html>
function GetDay(intDay){
var DayArray = new Array("Sunday", "Monday", "Tuesday", "Wednesday",
"Thursday", "Friday", "Saturday")
return DayArray[intDay]
}
function GetMonth(intMonth){
var MonthArray = new Array("January", "February", "March",
"April", "May", "June",
"July", "August", "September",
"October", "November", "December")
return MonthArray[intMonth]
}
function getDateStrWithDOW(){
var today = new Date()
var year = today.getYear()
if(year<1000) year+=1900
var todayStr = GetDay(today.getDay()) + " " + today.getDate() + " " + GetMonth(today.getMonth()) + " " + year;
return todayStr
}
document.write(getDateStrWithDOW());