Remember that to define an event handler, you assign a string containing the JavaScript statements that comprise the body of the handler, separated by semicolons, to the name of the event inside the html tag.
Use the form from Part II in the body of the page, except alter the onClick event handler to call your function, using the value field of the text box as its only argument.
Use a for loop to write out the html for a button for each element in the array. In the onClick event handler for each button, pop up an alert box that displays the string stored in the corresponding array element. The captions (defined using the value attribute) of the buttons can just be "Button 1", "Button 2", etc.
This exercise requires you to write JavaScript statements (the onClick event handlers) from JavaScript statements (the for loop). This is a tricky concept. Remember to enclose the JavaScript statements inside the event handlers inside a different style of quotation mark than you use to enclose the string that you are writing to the document.
Do the exercise behind the link labeled "Event Handlers: For Good and For Ill", on the main page.
Do the exercise behind the link labeled "The Document Object", on the main page.