This is to access and point to what you want when using JavaScript. Ok, now we want JavaScript to alert us the value inside this box. Try altering the text in the text box, and try clicking above again. You will see that it will alert the new entry each time. Ok, so whenever you create a form, always remember to give both the form and the element a distinct name in which JavaScript can then acquire to access the element.
Lets do an illustration with multiple boxes.
Basic Calculator-Enter a math expression in the first box, and than use the calculate button to get the answer. It attempts to, and out pops JavaScript errors-we shall discuss validating forms in the next lesson. Finally, lets do another example using what we've learned before, event handlers, with forms. Web Heaven . . . As you can see, we used the event handers we had learned before to give the textarea box different text, depending on the state of the mouse.