Modify your greet.html to similarly use a variable to simplify the displayed message. That is, the first JavaScript statement associated with the button's ONCLICK attribute should be an assignment that stores the contents of nameBox in a variable. Then, that variable should be integrated into the message being displayed (as opposed to the full getElementById expression).

What will be an ideal response?


```







Greetings



Greetings



Enter your name:


onclick="userName = document.getElementById('nameBox').value;
document.getElementById('outputDiv').innerHTML=
'Hello ' + userName + ', welcome to my page.
' +
'Do you mind if I call you ' + userName + '?';">





```

Computer Science & Information Technology

You might also like to view...

The pointer member in a self-referential class is referred to as a:

a. Link. b. Connector. c. Tie. d. Referrer.

Computer Science & Information Technology

?What is the projected shortage of data scientists in the USA, according to a McKinsey & Co. report?

A. ?100,000 or less B. ?100,000 to 200,000 C. 200,000 to 500,000 D. more than 500,000

Computer Science & Information Technology

Abby writes a program that redirects users trying to visit a Web site to a bogus Web site created by him. The scam Abby has committed is called _____.

A. ?pharming B. ?vishing C. ?phishing D. ?smishing

Computer Science & Information Technology

You would use a ________ box control to display a drop-down menu containing a list of customer satisfaction options from which users would select one

A) selection B) check C) list D) combo

Computer Science & Information Technology