Question
Javascript Question #1 Write an event handler so that when the user clicks the Press to Count button a function executes. The function should get
Javascript
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 #3
Write an event handler so that when the Press to Display Nums button is pressed a function executes. The function should get the two numbers entered in the textbox, make sure the numbers are valid, then determine which number is the larger, and print the numbers from the smallest number up to the largest number back onto the page.
Question #4
Write an event handler so that when the Press to Display Pattern button is pressed a function executes. The function should get the number entered in the textbox, make sure the number is less than 100, and print the following pattern back onto the page: ....1 ...2. ..3.. .4... 5.... where the number of rows and columns in the pattern is equal to the number entered by the user.Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started