Solved

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

Question 22

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

Unlock this Answer For Free Now!

View this answer and more for free by performing one of the following actions

qr-code

Scan the QR code to install the App and get 2 free unlocks

upload documents

Unlock quizzes for free by uploading documents