Where to Put Your Scripts
Using External Scripts
Putting Comments in Scripts
Alerting the User
Confirming a User's Choice
Prompting the User
Redirecting the User with a Link
Using JavaScript to Enhance Links
Working with Referrer Pages
To use this script on your own page, click in the text area below, select all, and copy to grab the script. Then, just paste into your own page — and you're done.
See it run: Redirecting the User with a Link
This HTML file allows you to redirect the user to another web page, based on a link.
This JavaScript accomplishes the redirection from the link.
This is the HTML for the page of the JavaScript-enabled user ends up on.