Which two code segments can you use?

You are creating a JavaScript function that displays the name of a web application.
You declare the following button element.
<input type=”button” id= “About” value=”About” />
When a user clicks the button, a JavaScript function named About must be called.
You need to create an event handler that calls the About function when the button is clicked.
Which two code segments can you use? (Each correct answer presents a complete solution. Choose two.)

You are creating a JavaScript function that displays the name of a web application.
You declare the following button element.
<input type=”button” id= “About” value=”About” />
When a user clicks the button, a JavaScript function named About must be called.
You need to create an event handler that calls the About function when the button is clicked.
Which two code segments can you use? (Each correct answer presents a complete solution. Choose two.)

A.
Option A

B.
Option B

C.
Option C

D.
Option D

Explanation:

Reference:
http://help.dottoro.com/ljeuqqoq.php
http://help.dottoro.com/ljinxrmt.php



Leave a Reply 5

Your email address will not be published. Required fields are marked *


Marcus Z

Marcus Z

The question is asked incorrectly. The two options given as the answer are both stand alone solutions as to how to perform an action on a click event.

Marcus Z

Marcus Z

nvm, javascript is weird.

VladimirV

VladimirV

It is saying ‘Which two code segments can you use? (Each correct answer presents a complete solution. Choose two)’. The answer is asked correctly.

Cristian

Cristian

One is for IE9 version and earlier, the other one(addEventListener) for IE9+ and Chrome, Safari etc.

Helpful_Coder

Helpful_Coder

This is correct