5/5 – (2 votes)
3. Code an event handler named processEntry() that gets the user’s entry and checks to make sure that it is a number between 0 and 99. If it isn’t, display an alert dialog box for the error. If it is valid, call a function named makeChange() and pass it the user’s entry.
4. Code the makeChange() function, which should have one parameter that accepts the user’s entry. This function shouldn’t return anything, but it should display the results in the text boxes for Quarters, Dimes, Nickels, and Pennies.
5. Code an onload event handler that attaches the processEntry() event handler to the click event of the Make Change button. Then, test the application.