You can create an image element and add it to a new cell:
function displayResult() { var firstRow=document.getElementById("myTable").rows[0]; var x=firstRow.insertCell(-1); x.innerHTML="New cell"; var img = document.createElement('img'); img.src = "link to image here"; x.appendChild(img); }
Beware of creating raw HTML for the image, if you do, you need to make sure that you avoid src and any other attributes.
source share