May 6, 2013

Using If Statement

Coding

<html>
<body>
<script language="JavaScript">
var d = new Date()
var time = d.getHours()
if (time < 10)
{
document.write("<b>Good morning</b>")
}
</script>
<p>
This example demonstrates the If statement.<p>If the time on your browser is
less then 10, you will get a "Good morning" greeting.
</body>
</html>