JavaScript Programs
Where the JavaScript Goes Information
about CDATA or separate files.
- functions1.html,
functions1wExternalJS.html
TestBrowser.html, TestBrowserWithComments.html, TestBrowserWithComments2.html
<script language="javascript">
CDATA or external files for the JavaScript
hiding JavaScript from old browsers inside comments
function notation and parameters
alert( )
- functions2a1.html
, functions2a2.html, functions2a3.html
, makeChange.html
variables - defining and changing their values and types
returning a value from a function
prompt( ) and parseInt( )
concatenation vs. addition - overloading of operators
document.write( )
- doc_write.html,
doc_write_revisted.html
including HTML tags, single and double quotes
including images
document.write(string1,string2) etc. form
multiple document.writes vs. assembling one long string
- arith_funtions1.html, arith_functions_2.html
functions for adding, multiplying etc. one and two variables
- CoerceTypes.html,
TypeConversion_properlyDone.html
stings and numbers (integer, float) and + operator
how to convert between strings and numbers
- GlobalChange,
moreGlobalChange Scope_of_Vars
local and global variables
- miniTable.html
how to write out a table in document.write( )
- rounding.html
how to get floating point numbers rounded and
how to print out to a certain number of decimal places