Javascript Autoredirect

Here's what I hope will be the only bit of Javascript I ever write. If you want to see how it works, turn Javascript on and reload this page.

<BODY onLoad="window.noJs()">

<SCRIPT LANGUAGE="Javascript">
  <!-- Begin
  function noJs() {
    var destination = "NoJavascript.html";
  // End -->

To use:

  1. Add the script to your Web page

  2. Add the onLoad="window.noJs()" attribute to the <BODY> tag

  3. Replace NoJavascript.html with the name of the page you want Javascript-enabled browsers to be forwarded to.

Enjoy. I considered adding this to my home page, but I decided against it.

It's all part of the Dehanced for... campaign.

Last updated 8 June 2000
All contents ©1999-2002 Mark L. Irons