HTML contoh chap6 mudul lab contoh2

<html>
<body>
<script type="text/javascript">
var d = new Date()
var time = d.getHours()
if (time < 10)
{
document.write("<b>Good morning</b>")}
else
{
document.write("<b>Good day</b>")
}
</script>
<p>
This example demonstrates the If...Else statement.
</p>
<p>
If the time on your browser is less than 10, you will get a "Good morning"
greeting.
Otherwise you will get a "Good day" greeting.
</p>
</body>
</html>
Category: 0 komentar

0 komentar:

Posting Komentar