You re-set the variable in this last line:
htmlString = '</html>';
Add +and it will work:
var htmlString = '<html>';
var headerString = "image1";
var sImage = "Android_images/" + headerString + ".png";
htmlString += '<img src="' + sImage + '" />';
htmlString += '</html>';
Also, why are there tags here <html>?
source
share