"); window1.document.writeln("The Answer"); window1.document.writeln("
"); window1.document.writeln("This might be a good way to give an answer to a question."); window1.document.writeln("
"); window1.document.writeln("
"); window1.document.close(); } function NewWindow2() { //this defines the second window, accessed by button#2 window2=window.open("", "NewWindow2","toolbar=no,directories=no,menubar=no,scrollbars=no,width=200,height=225"); window2.document.writeln("Hint"); window2.document.writeln("
"); window2.document.writeln("
"); window2.document.writeln("You could give hints this way, too."); window2.document.writeln("
"); window2.document.writeln("
"); window2.document.close(); } function NewWindow() { win2=window.open("a.gif","NewWindow","toolbar=no,directories=no,menubar=no,scrollbars=no,width=200,height=225"); } function nav(x) { history.go(x); } function pushbutton() { alert("You can write any message here."); } function formHandler(){ var URL = document.pulldown.selectname.options[document.pulldown.selectname.selectedIndex].value window.location.href = URL } imageURL="b.gif"; function changeImage() { if(imageURL=="a.gif") { imageURL = "b.gif"; } else { imageURL = "a.gif"; } document.images[0].src = imageURL; }

JavaScript Page

This page shows a few things that can be done with JavaScript.
Many of the things displayed on this page are "time-wasters", though a few may be useful for teachers.

Scrolling Banner

Status Bar Messages

These may have some good uses, but they are often over used.

Put your mouse over this and look at the bottom of your screen.

New Windows

E-mail Button

It's sort of stupid to do this, since it requires a javascript enabled browser and also takes more code than the traditional mailto: code. (mailto:iteslj@ge.aitech.ac.jp.)

Confirm Dialog Box

Allows you to force someone to confirm that they really want to do something. Probably not of much use except to "show-off", so I wouldn't use it.

Click this link and you'll be given a choice.
The Internet TESL Journal

History Buttons

Or as a clickable link: Back 2 Pages

Click and Get an Alert and Jump to the Top

Click Here!
Click Here!, too.

onFocus Alert

Type something here:

Background Color

Click inside any box to change the color of the background.

Pull-Down Menu for URLs

This not only requires more code than doing it the traditional way, it also doesn't change the link's color allowing the user to know which URL he has already visited.

Display a New Image