ivobrugge.be - JavaScript: functies.
sitemasters.be - Functies in JavaScript.
voorbeginners.info - JavaScript voor beginners.
w3schools.com - JavaScript Conditional Statements | w3schools.com - JavaScript Functions |
w3schools.com - JavaScript Objects | w3schools.com - JavaScript Operators |
w3schools.com - JavaScript Statements | w3schools.com - JavaScript Switch Statement |
w3schools.com - JavaScript Variables
w3schools.com - JavaScript Examples.
In de body-sectie: <button onclick="myFunction()">Begroeting</button> <p id="begroeting"></p> <script> function myFunction() { var x=""; var time=new Date().getHours(); if (time<20) { x="<cite>Goeiedag.</cite>"; } else { x="<cite>Goeieavond.</cite>"; } document.getElementById("begroeting").innerHTML=x; } </script>