WixCode understands all of Javascript, except for anything that accesses the DOM. This keeps the user from inadvertently “breaking” something. Accessing document elements such as div, span, button, etc is off-limits. The way to access elements on the page is only through $w.
One small exception is the $w.HtmlComponent (which is based on an iFrame). This element was designed to contain vanilla HTML and it works just fine. You just can’t try to trick it by using parent, window, top, etc. Same goes with the Javascript evaluate() function. It is sandboxed and does not allow access to the DOM.
Yisrael, thank you for your reply. Unfortunately, since I’m not a programmer, I don’t really understand your comment. Is using this JavaScript possible on the Wix platform? If so, how would it be implemented?
The script you posted is from 2002. It will not work.
Edit: specifically the opening/closing tags are not properly formatted. If the script hasn’t been updated in 16 years I’m gonna guess the service is depreciated.