One can parameterize HTML using document.write(ln) commands such as:
|
document.writeln("string1" + JSvariable +"string2"); // etc.
|
A "lighter weight way of achieving this can be illustrated by direct HTML syntax with NO <SCRIPT> tag and no document.write
|
<IMG WIDTH="&{JSvar1};" SRC="&{JSvar2};" >
|
where JSvar1 and JSvar2 are JavaScript variables holding width and URL of image
|
Syntax is modeled on that for for special characters
|
Such JavaScript Entities can ONLY appear on RIGHT HAND side of attribute values
-
Cannot appear in HTML text such as titles.
-
document.writeln approach has no such restriction!
|