1 |
One can parameterize HTML using document.write(ln) commands such as:
|
2 |
document.writeln("string1" + Jsvariable + "string2");// etc.
|
3 |
There is another way of achieving this without a <SCRIPT> tag and no document.writeln -- namely
|
4 |
<IMG width="&{JSvar1};" src="&{JSvar2}" >
|
5 |
where JSvar1 and JSvar2 are JavaScript variables holding width and URL of image
|
6 |
Syntax is modeled on that for special characters where
|
7 |
Such JavaScript Entities can only appear on right hand side of attributes values and cannot appear in HTML text such as titles
-
document.writeln approach has no such restriction!
|