Friday, September 5, 2008

Introduction to JavaScript

Equipment / software
We will use Notepad on Windows 98 PCs, but any test editor capable of saving documents in plain-text format will work. Any web browser can be used; we will use Netscape Navigator. Be aware, however, that there are some browsers that would handle your code differently.

Handouts & class files

  • Class handout: Introduction to JavaScript
  • base.html
  • cat.html
  • demo.html
  • dog.gif
  • family.gif
  • hamster.gif
  • harry.gif
  • logoscroll.gif
  • logostill.gif
  • resources.html

  • Prerequisites
    We will assume you have a working knowledge of HTML tags.

    Introduction
    In this class, you'll become familiar with some concepts and terminology of JavaScript by creating some
    working examples. We hope you’ll learn enough that you are able to use the materials referenced at the
    end of this handout on your own.

    This course will NOT be dealing with programming fundamentals, or rigorous programming structures
    within JavaScript. That topic is far too broad for a two-hour introduction to JavaScript. For more depth,
    please try at the online tutorials listed in the references section at the end of this document or take Cornell’s
    course, CS 130 Creating Web Documents.

    We will use JavaScript to add the following features to your web page:
  • Dynamically created HTML
  • Pop-up boxes
  • Mouse Rollover effects
  • Menu
  • Changing text in the status bar
  • Various effects cutting and pasting from existing scripts
  • Drop-down menu with links

  • Feel free to explore the demo.html and take a look at the source code for the scripts we will be creating
    today. Go to View > Page Source to view the code.