Skip to content
Advertisement

img tag removing slashes from the src

the problem I’m facing is that I get a image URL from an input tag then storing it in a let then I create a li tag with an image tag in it. I put imageURL variable in the src but the image tag removes the slashes from the variable

JavaScript

Advertisement

Answer

Note that has special meaning. So you need to use \ instead of like this:

JavaScript

JavaScript
JavaScript

Also you forgot " after movie-element__image class

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