1 | <HTML><HEAD><TITLE>JavaScript Used to Parameterize HTML</HTML> |
2 | <SCRIPT LANGUAGE="JavaScript" > var imagewidth=600;// These could be changed by form var imagefile="npac.gif"; //input or some computation // based on size of window (available to JavaScript) </SCRIPT></HEAD> |
3 | <BODY> <h2>Plain old HTML of any type</h2> ...... <SCRIPT LANGUAGE="JavaScript" > document.writeln(`<imag align=top width=` + imagewidth + `src="' + imagefile +'" >'); </SCRIPT> |
4 | <b>And the beat goes on ...</b> |
5 | </BODY></HTML> |
6 | Note the horrible mix of ` (JavaScript) and " (HTML) |
7 | JavaScript Variables |