Alert Box:

More info: JavaScript Alert

What time is It?? !!!!! :D

Click the button to display the date.

This free script provided by
JavaScript Kit

expr:class='"loading" + data:blog.mobileClass'>

Linggo, Marso 9, 2014

Greetings 2

<html>
<body background="egg.gif">
<p> Click the button to get a time-based greeting.</p>
<button onclick="myFunction()">Try it</button>
<p id="demo"></p>
<script>
function myFunction()
{
var x="";
var time=new Date().getHours();
if(time<11)
x="Good morning its eleven in the morning";
}
else if(time<20)
{
x="Good day";
}
else
{
x="Good evening";
}
document.getElementById("demo").innerHHTML=x;
}
</script>
</body>
</html>

Walang komento:

Mag-post ng isang Komento