[exit example]
 
 \input TeX4ht.sty
 \Preamble{html,sty}      \EndPreamble
 
 Hello from html.
 \JavaScript
 document.write("<P>Hello from JavaScript.")
 \EndJavaScript
 
 \bye
[download source]
Non-simulated output:
mn-41.html
Hello from html. Hello from JavaScript.