JavaScript samples for XHTML - Internet 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 examples from CIS120/17 to introduce JavaScript hello.html
multiply.html
multiplyans.html
addnum.html
addnumcont.html
mathans.html
ifwithif.html
MAorRI.html
prob2.html
whileloop.html
doloop.html
ifwithloop.html
finaltotals.html
Loop comparison:
Math facts while loop
Math facts nested while loop
Math facts do...while loop
Math facts nested do...while loop
Math facts for loop
Math facts nested for loop
Arrays:
thedate.html
thedate12.html
thedate12another.html
souparrayjs1.html Search using JavaScript
Solving logic problems:
Guess number, one guess
Guess number, one game
Guess number, multiple games
Using JavaScript: Calculate exam average
JavaScript Events CisaCisbx.html (events) - validates transitional
alternativeCisa.html (events)
alt2Cisa.html (events)
jsmousex09.html (events) - validates transitional
altjsmouseex11.html (events)
buttonclickx.html (events) - validates transitional
tryevent1x09.html (events) - validates transitional
tryevent2x09.html (events) - validates transitional
onclickx09.html (events) - validates transitional
setbgcolor.html (events)
setbgcolorfunc.html (events)
setbgcolorfunc1.html (events)
Java Script Introductory Examples embedded in XHTML fontcolorsx.html - does not validate
fontcolorscomx.html - validates strict
datetimex.html - validates strict
navtypex.html - validates strict (no longer works - need appName)
time1x.html - validates strict
time1ax.html - does not validate
timex.html - validates strict
time5x.html - validates strict
timemore1x.html - validates strict
testif1x.html - validates strict
testif2x.html - validates strict
changepg1x.html - validates transitional
changepg2x.html - validates strict
tabletestx.html -validates transitional
calcgradex.html - validates strict
JavaScript Functions embedded in XHTML BE SURE TO CHECK EXAMPLES UNDER HTML5/JavaScript.
introfuncx.html - validates strict
passfunc1x.html - validates strict
passfunc2x.html - validates strict
passfunc3x.html - validates strict
passfunc3ax.html - validates strict
passfunc4x.html - validates transitional
passfunc5x.html - validates transitional
passfunc6x.html - validates transitional
Additional examples used in the presentation:
    passfunc2ax.html
    passfunc3bx.html
    passfunc4ax.html
    passfunc4bx.html
    passfunc5ax.html
avgfuncax.html - validates strict
avgfunca1x.html - validates strict
avgfuncbx.html - validates strict
avgfunccx.html - validates strict
avgfuncdx.html - validates strict
avgfuncex.html - validates strict
avgfuncfx.html - validates strict
avgfuncgx.html - validates strict
avgfuncg1x.html - validates strict
funccrsx.html
trythisx.html
More JavaScript - loops BE SURE TO CHECK EXAMPLES UNDER HTML5/JavaScript.
whileloop1x.html
calcgradewx.html
dowwhileloop1x.html
calcgradeddowx.html
mathforx.html
mathfor1x.html
mathfor2x.html
mathfor2ax.html
calavgformx.html
calavgform1x.html
calavgform2x.html
calavgform3x.html
calavgform4x.html
More JavaScript - misc BE SURE TO CHECK EXAMPLES UNDER HTML5/JavaScript.
chktestx.html
chktest1x.html
chktest2x.html
optbuttontestx.html
optbuttontest1x.html
accumamtx.html
time6arrayx.html
time7arrayx.html
endlessloopx.html
arrayrotatex.html
Extra JavaScript newsitex.html
withpopupx.html
withpopup1x.html
msgpopupx.html
amenuwindowx.html
athemenux.html
southworthx.html
animation.html
animationrepeat.html
testsend.html
testreceive.html
searchx.html
DOM examples Under HTML5.

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

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