Basic HTML version of Foils prepared 1 Dec 97

Foil 21 Variables

From Overview of Basic JavaScript -- Web Client Scripting Language Jackson State CSC499 -- Fall Semester 97. by Tom Scavo,Geoffrey C. Fox


1 Variables (identifiers) must begin with a letter, underscore, or dollar sign:
  • var := [a-zA-Z_$][a-zA-Z0-9_$]*
2 Declare variables in var statements: var aNumber = 137; var aString = "1";
3 Embed variables in HTML attributes: <IMG SRC="&{v1};" WIDTH="&{v2};"> where v1 and v2 are JavaScript vars

in Table To:


© Northeast Parallel Architectures Center, Syracuse University, npac@npac.syr.edu

If you have any comments about this server, send e-mail to webmaster@npac.syr.edu.

Page produced by wwwfoil on Sun Nov 29 1998