nerdexam
Microsoft

70-515 · Question #63

You create a Web page that contains the following image element. <img id="myImage" src="/image1.png" /> You need to write a JavaScript function that will dynamically change which image is displayed…

The correct answer is B. function changeImage() {. See the full explanation below for the reasoning.

Question

You create a Web page that contains the following image element. <img id="myImage" src="/image1.png" /> You need to write a JavaScript function that will dynamically change which image is displayed. Which code segment should you use?

Options

  • Afunction changeImage() {
  • Bfunction changeImage() {
  • Cfunction changeImage() {
  • Dfunction changeImage() {

How the community answered

(18 responses)
  • A
    11% (2)
  • B
    83% (15)
  • D
    6% (1)

Community Discussion

No community discussion yet for this question.

Full 70-515 Practice