Solved

What, If Anything, Is Wrong with the Following JavaScript Code

Question 11

Multiple Choice

What, if anything, is wrong with the following JavaScript code?
<script>document . write("<img src = 'puppy . JPG'/>") ;</script>


A) You cannot use document . write() to display an image; it can only display text .
B) The outer double quotes are not needed with the document . write() function .
C) You cannot use the document . write() function with JavaScript; it must be used with a form .
D) Nothing is wrong with this code .

Correct Answer:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions