Advanced DHTML

 

Static web pages contain just HTML code
In-line JavaScript combined with HTML can generate dynamic content as a page is loading into the browser
In-line JavaScript does not require a function, since it is being interpreted by the browser immediately, versus waiting for a "user event"

Example:

<html><body><h1>Welcome to a DHTML page</h1>
<script>
var time = new Date()
if         (time.getHours()<12) document.write('Good Morning!')
else if (time.getHours()<17) document.write('Good Afternoon!')
else                                             document.write('Good Evening!')
</script></body></html>

Author: Michael Curry