Question: 3. Write an HTML page that includes an input in the body section--its type should be a button, its value should be Click me!

3. Write an HTML page that includes an input in the body section--its type should be a button, its value 

3. Write an HTML page that includes an input in the body section--its type should be a button, its value should be "Click me!" and its onclick should be clickHandler(). Add a div in the body with an id of "message." In the head, section write a JavaScript function named clickHandler. In this handler, get the document's element by id using "message." Set this element's inner HTML field to header 1 with the text of "Clicked!" Clicking the button should display this message in the body

Step by Step Solution

3.28 Rating (154 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

To fulfill the requirements of the question we need to create a simple HTML page with a J... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!