- The <h4 id="greeting">test</h4> is just like a normal header. But now it also has an ID-label.
- dt= a variable that is filled with the current hour. (At the PC of the visitor)
- Depending on the time, another text is written to the H4-banner.
- document.getElementById("greating").innerHTML='your new text'
You can also put your script in a separate file. example 'main.js' and you call this script from within the html page with the following code:
More programming fun:
On this site you will find other simple examples to take the first steps in programming. Even some computer games !!! See for example in this YouTube video:
Or the Corona Shooter Game in C# tutorial. You can play it here (free download) but also find the source code to program the game itself. Just by using other drawings, you can make another game. For example, a 2D space shooter.
How does this game look like? I made a short YouTube video. But again you can make a completely different game. Just by using other drawings.
Back to English Infonosity.net
Back to Computers en Elektronica (Dutch)