In Chapter 9 You Created A Magichtml Page That Simulated

In Chapter 9, you created a magic.html page that simulated the behavior of a Magic 8-Ball. As written, your page completely ignores the user’s question while randomly selecting from a list of possible responses. Modify your page so that it is less obvious that the entered questions are irrelevant to the page’s execution. In particular, the function in the page should use an if statement to make sure the user entered a question. If not (i.e., the value accessed from the text box is the empty string), then the browser should open an alert box reminding the user to enter a question. However, if the user did enter a question (i.e., the text box is not empty), the page should proceed as before and display a randomly chosen answer. For example,
If (document.getElementById(‘questionBox’).value == ”) {
alert(‘You need to enter a question first!’);
}
else {
// existing code for selecting and displaying an answer
}

Place this order or similar order and get an amazing discount. USE Discount code “GET20” for 20% discount