JavaScript: Lesson 6

Using Two Parameterized Functions

Please enter some text:


When you enter text into the textbox and press OK, your data is sent to my custom function.
There it is processed and I show your message in an alert box.

However, this page uses some "helper" functions. One replaces "document.getElementById" so
we don't have to type that all the time!!!  Look at the code in the onClick parameter of the button. Then notice how I use it.

The second helper function clears the textbox and sets its focus.