Skip to content Skip to sidebar Skip to footer

Setting Src To Base64-encoded Image With Javascript Is Failing

I'm trying to set src with JavaScript, but the image is missing visually; it is empty. The image URL after running this code starts with 'http://127.0.0.1:8080/%27' (I

Solution 1:

You should set src without apostrophes:

document.getElementById(id).src=mySrc;

Post a Comment for "Setting Src To Base64-encoded Image With Javascript Is Failing"