Don't click on me...I can't even spell Javascript

Computer Information Systems 132

JavaScript Code Snippets

When you need code for a specific job, then check out this list. Instead of scrounging around in your notes, I put some major code snippets here for you. In most cases they are copied from our JavaScript classroom projects. Others are courtesy of Mike Murach & Associates.

  • General HTML Tags
  • Simple Web Page

CSS Examples

  • CSS Rollovers (See p.189
    for hyperlink options)
  • External Style Sheets

JavaScript Code Examples

  • Working with the  page
  • Linking to external pages
  • Windows Object
  • Creating new windows demo does all this:
    • Open window without or with menus/toolbars
    • Navigate to sections on a page including go to top
    • Close the browser
    • Use buttons to open a window
    • Use buttons to navigate
    • Find browser type & version
  • Windows.navigate
  • Windows.close
  • Global Methods
  • Variables (Lesson 3)
  • Custom Event Handlers
  • CSS Styles
  • Labels & Textboxes
  • List Boxes & Dropdowns with the Select Object (Lesson 4)
  • List Box Fun :
    • Dropdowns
    • List boxes
    • Get selected item & price
    • Pre-selecting an item
  • Forms
  • Validation functions
  • Rollovers
  •  
  • Strings
  • If statements
  • Math Functions
  • Custom Functions
  • Arrays

 

Revised: February 05, 2015