Skip to content
Advertisement

Displaying an image dynamically in a html table in JavaScript

I am trying to display an image in a table. This is what I have tried:

JavaScript

I am getting a compile time error in the second line:

“; expected”.

I tried many syntax like:

JavaScript

but nothing is getting compiled.

Advertisement

Answer

Correct answer is replacing "' + imgv + '" with '" + imgv + "'

JavaScript
User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement