You can create the image element and append it to the 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 building the raw HTML for the image, if you do it that way you'll need to make sure that you escape the src
and any other attributes.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…