Example for If...Else statement. : If : Language Basics JAVASCRIPT DHTML TUTORIALS


JAVASCRIPT DHTML TUTORIALS » Language Basics » If »

 

Example for If...Else statement.





<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>

</body>
</html>


           
       



-

Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .

Follow Navioo On Twitter

JAVASCRIPT DHTML TUTORIALS

 Navioo Language Basics
» If