<!DOCTYPE html>
<html>
<head>
<body>
<body background="sky.jpg">
<script>
function myfunction()
{
var x;
var date=new Date().getDay();
switch(date)
{
case 0:
x="Sunday";
break;
case 1:
x="Monday";
break;
case 2:
x="Thuesday";
break;
case 3:
x="Wednesday";
break;
case 4:
x="Thursday";
break;
case 5:
x="Friday";
break;
case 6:
x="Saturday";
}
document.getElementById("deemo").innerHTML=x;
document.getElementById("demo").innerHTML=new Date();
}
</script>
</head>
<p id="demo">Click to show time</p>
<p id="deemo">Click to show day</p>
<a href="http://pastebin.com/u/NoNameCracksInc">www.pastebin.com</a>
<button type="button" onclick="myfunction()">Show date</button>
<button type="button" onclick="alert('Testing website')">INFO</button>
</body>
</html>
Comments