Question: Question #1 Write an event handler so that when the user clicks the Press to Count button a function executes. The function should get the
Question #1
Write an event handler so that when the user clicks the Press to Count button a function executes. The function should get the sentence and the letter from the textboxes and determine how many times the letter appears in the sentence (both upper and lowercase). The function should print the count to the html page. See the screen shot above for sample output.
Question #2
Write an event handler so that when the Press to Enter button is clicked, a function executes. The function should prompt the user to continuously enter numbers until a negative number is entered. Once a negative number has been entered, you should then print the average of all the entered numbers to page. If the user does not enter any non-negative numbers (i.e., they only enter one number and its negative), you shouldinstead print an error message to the page. You must use a do while loop to solve this problem.

Question 1 Enter a sentence: Enter a letter: The letter e appears 2 times in the string mischief managed Question 2 The average is 4 The average of the numbers you enter will appear here
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
