Example of a script on an arbitrary place in the source with programmed text or text strings
Here you see on a arbitrary place in the html source a simple script. The script presents texts or strings in your, this, document.
<HTML>
<HEAD>
<TITLE>.....</TITLE>
<HEAD>
<BODY>
xxxx<BR>
xxxx<BR>
xxx ... xxx<BR> <-- html
xxxx<BR>
<SCRIPT> <-- begin of this script
window.document.open() <-- line 1
window.document.writeln("abcdefgh...~!@#$...xyz<BR>") <-- line 2
window.document.close() <-- line 3
</SCRIPT> <-- end of this script
xxxx<BR>
xxxx<BR>
xxx ... xxx<BR> <-- html
xxxx<BR>
</BODY>
</HTML>
Result:
xxxx
xxxx
xxx ... xxx
xxxx
xxxx
xxxx
xxx ... xxx
xxxx
Comment:
You see that a script can be combined with a file. Here: a JavaScript script with a html-file. We call this technique: programmed text. The file becomes 'smart'. The place of the script in the file is not prescribed. Here: halfway.
'Open', 'writeln' and 'close' are methods in object 'document' in object 'windows'.
Enschede, 4 nov. 1999; updated 2003