This Javascript is invoked through the pseudo-protocol in an event handler of a <h1> heading. The script code is contained in the text value of the event handler attribute.
<h1 onmouseover="javascript: window.document.fgColor = 'white'; window.document.bgColor = 'black';" onmouseout="javascript: window.document.fgColor = 'black'; window.document.bgColor = 'white';" ">Javascript Test</h1>