JavaScript samples for CIS44 - Internet User/Developer

Note that some of these are versions where I have made the code a little more professional with semi-colons etc. Some of the less professional (my original learning curve) versions will show up in the PowerPoint so I am referring to them here as well. Remember it is important to see a wide variety of styles in JavaScript because that is what you will encounter in the samples on the Web. Most code is not professionally done and you need to be able to work with it!
Sample JavaScript code Link to retrieve
JavaScript Events Mouse event with explanation
Another version
Mouse event
Mouse event with changed code and explanation
Event example #1
Event example #1 - another version
Event example #2
onClick event
JavaScript Introduction to JavaScript with fonts
Introduction to javascript with fonts (prior to revision)
Navigating in javascript
An example of onClick and script
If and time - example #1
If and time - example #2
If and time - example #3
If and time - example #4
If and time - example #5
Another example using time
Note: With fast load times the next 2 make no impact - they used to! I kept them because they show a few other things that I want to cover.
Flickering load #1
Flickering load #2
Variety of IF tests
Getting information from another page - example #1
Getting information from another page - example #2
Table test
Calculate grade with data entry, calculate, if
Another version of calculate grade above
Introduction to functions - averages - example A
Introduction to functions - averages - example AA
Introduction to functions - averages - example B
Introduction to functions - averages - example C
Introduction to functions - averages - example D
Introduction to functions - averages - example E
Introduction to functions - averages - example F
Introduction to functions - averages - example G
Introduction to functions - averages - example H
Introduction to functions - averages - example I
Function example
Another type of function
While loop
Calculate grade with while loop
Do...While loop
Calculate grade with do...while loop
For loop (mathfor.html)
Another for loop (mathfor1.html) - try in both browsers
For loop using cancel (mathfor2.html)
Another for loop using cancel (mathfor2a.html) - more approved code
Calculate a grade average
Another calculate a grade average
Another calculate a grade average
Another calculate a grade average
Another calculate a grade average - pass separately
Check test - shows receiving info from a checkbox
Check test - receiving info individually - more technical version
Radio button check
Another version of the radio button check
Accumulate two random numbers
Array of month names
Array of month names an day names
Array and an endless loop
Array looped through under user control
Loading a new site
Popup window
Variation on popup window
Message for popup window
Another window example
Menu to go with example above
Logon script
Calculation and array
Searching from your page

Send e-mail to Mrs. Grocer: pgrocer@bristol.mass.edu

Back to the Top
Return to home page
Return to previous page