topical media & game development

talk show tell print

basic-web-html-11-ch11-eg07.htm / htm

  <?xml version="1.0" ?>
  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  <html xmlns="" lang="en" xml:lang="en">
  <title>Conditional statements</title>
  <script type="text/JavaScript"> 
  var date = new Date(); 
  var time = date.getHours(); 
  if (time < 12) {
    document.write('Good Morning'); 
  else {
    document.write('Good Afternoon'); 

(C) Æliens 20/2/2008

You may not copy or print any of this material without explicit permission of the author or the publisher. In case of other copyright issues, contact the author.