Friday, February 26, 2010

Week 6 - JavaScript Examples

Here are my links for the JavaScript examples – everything works:

IF ELSE EXAMPLE
If the time on your browser is greater than 18, you will get a "Good evening" greeting. Otherwise you will get a "Do you have the time?" greeting.
http://phobos.ramapo.edu/~cdaleo/Technology/Week6/If_Else_Example.html

EXTERNAL FILE EXAMPLE
Added external .js file and linked it with script tags in my HTML page.
http://phobos.ramapo.edu/~cdaleo/Technology/Week6/ExternalFile_Example.html

SWITCH EXAMPLE
This JavaScript will generate a different greeting based on what day it is. Anything other than Friday, Saturday, and Sunday should generate an "Is it almost the weekend?" message.
http://phobos.ramapo.edu/~cdaleo/Technology/Week6/Switch_Example.html

FUNCTION EXAMPLE - RETURN
The function will return the addition of these two parameters.
http://phobos.ramapo.edu/~cdaleo/Technology/Week6/Function_Return.html

FUNCTION – ALERT
Modified example to display “Encouragement” and “Motivation” buttons. When clicked, they generate a message box with a quote.
http://phobos.ramapo.edu/~cdaleo/Technology/Week6/Function_Alert.html

FOR LOOP
As long as “I” is less than, or equal to 10, the loop will continue to run, “I” will increase by 1 each time the loop runs.
http://phobos.ramapo.edu/~cdaleo/Technology/Week6/For_Loop_Example.html


FOR WHILE LOOP
Did a for while loop that increments up to 20.
http://phobos.ramapo.edu/~cdaleo/Technology/Week6/Do_While_Example.html

ARRAY
Added an array of five colors listed.
http://phobos.ramapo.edu/~cdaleo/Technology/Week6/Array_Example.html

ERROR EXAMPLE
An error message pops up.
http://phobos.ramapo.edu/~cdaleo/Technology/Week6/Error_Example.html

TIMER EXAMPLE
Modified the button label and added a pink background.
http://phobos.ramapo.edu/~cdaleo/Technology/Week6/Timer_Example.html

No comments:

Post a Comment