JavaScript samples for HTML5 - 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
Beginning JavaScript embedded in HTML5 helloWorld.html (not HTML5)
helloWorld5.html
multiply5.html
addnum5.html
addnumcont5.html
adddivide.html
mathdecision5.html
mathdecisionbetter5.html
paychkfirst5.html
paychksecond5.html
usingAND5.html
usingOR5.html
andeither5.html
andeithercom5.html
whileloop5.html
doloop5.html
forloop5.html
Continuing beginning JavaScript focus on loops and decisions ifwithloop5.html
finaltotals5.html
mathfactswhile5.html
mathfactswhilenested5.html
mathfactsdo5.html
mathfactsdonested5.html
mathfactsfor5.html
mathfactsfornested5.html
guessgameone5.html
guessgameonegame5.html
guessgamemulti5.html
Looking at basic DOM substitution for document.write Domwrite1.html
mathDecisionDOM.html
ifwithloopDOM.html
mathfactswhileDOM.html
mathfactswhileDOMalt.html
JavaScript Events onmouse5.html
mousealert5.html
anothermouse5.html
altmouse5.html
altclickbutton5.html
clickbutton5.html
changebackground5.html
backgroundmouseF13.html
otherevents5.html
somemoreclick5.html
somemoreclick5rev.html
focusetc5.html
eventwithfunction5.html
functionbgfg.html
Some examples I tried using HTML5 and JavaScript Functions:
introfunc5.html
passfunc15.html
passfunc25.html
passfunc35.html
passfunc3a5.html
passfunc45.html
passfunc55.html
passfunc65.html
Additional examples used in the presentation:
    passfunc2a5.html
    passfunc3b5.html
    passfunc4a5.html
    passfunc4b5.html
    passfunc5a5.html
funcA.html
funcB.html
funcBa.html
funcBb.html
funcC.html
funcD.html
passfuncF11.html
passfuncF11a.html
passfuncF11by.html
passfuncF11bx.html
passfuncF13return.html (uses name)
passfuncF13return2.html (uses id)
calcfunction.html
calcfunctionprompt.html
calcfunctionprompt1.html
calcfunctionform.html
Loops etc:
testbkcolorF11.html
testbkcoloroldF11.html
mathbasic.html
mathfor25.html
mathmathfor2a5.html
Arrays:
deptIIIarray.html
deptIIIarrayfunc.html
deptIIIarrayfunc2.html
js2dim.html
assocarraycrs.html Associative array
assocarraycrsDOM.html Associative array using DOM
Arrays with DOM
DOMwrite2.html
assocarraycrsDOM.html
Other:
checkboxCrs.html
checkbox1.html
checkbox2.html
radiopay1.html
radiopay1id.html
radiopay1idtest.html
radiopay2.html
DOM examples passfuncDOM.html
passfuncDOMrev.html
passfuncnameDOM.html
multinamesDOM.html
multinamesDOMid.html
getbyID.html
test1.html
DOMeventsbasic.html
DOMevents.html
DOMBasics0.html
DOMBasics1.html
DOMBasics1a.html
DOMBasics2.html
DOMBasics3.html
DOMBasics4.html
DOMBasics5.html
getelementbyid1.html
DOMinsertagain.html
DOMinsertagainmore.html
DOMinsertagainmore2.html
externaljs.js
externaljs2.js
addrow.html
addrow2.html
addrow4.html
More DOM examples calculatetotalpassreturnDOM.html
DOMgetinfo.html
Above and beyond...
    DOMgetinfo1.html
    DOMgetinfo2.html
    DOMgetinfo3.html
    DOMgetinfo4.html
    DOMgetinfoset.pdg (explanation)
    mathfacts5DOM.html
JQuery Mobile Some of the examples in later zips, link to code in the beginning zips so I suggest one directory.
Basic examples to get started
Second group of basic examples
Bar and navigation examples

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

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