5
10:56| Author:
Tips Triks

Stetmen menggunakan IF ... ELSE !
MAsukan KOde Berikut;

<html>
<body>

<script type="text/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>
<p>If the time on your browser is less than 10, you will get a "Good morning" greeting.</p>

</body>
</html>

lihat hasilnya...

1 komentar untuk " "

  1. Bos gimana biar jendela window waktu d buka, kaya gini goyang, KOCAK !!!
    kasih tau donk boss?

    BalasHapus