images 文件夹中的图像未在 mobilefirst 中加载
Image from images folder is not loading in mobilefirst
我正在使用 mobilefirst 项目。
我遇到无法在 javascript 中加载图像的问题。我的图像放在图像文件夹中。当我检查控制台是否添加到 div 中时,工具提示 src 提示 Could not load the image.
jQuery('#placeher').show();
// var table = $('#mydemo1');
for (var i = 0; i < result.length; i++)
{
doc1=result[i];
if(doc1.PHOTO == "")
{
var elem = document.createElement("img");
elem.setAttribute("src","../common/images/Icon-60.png");
elem.setAttribute("height", "60");
elem.setAttribute("width", "60");
document.getElementById("placeher").appendChild(elem);
}
}
图像文件夹的正确路径是 images/<image file name>
。例如:<img src="images/thumbnail.png"/>
.
我正在使用 mobilefirst 项目。
我遇到无法在 javascript 中加载图像的问题。我的图像放在图像文件夹中。当我检查控制台是否添加到 div 中时,工具提示 src 提示 Could not load the image.
jQuery('#placeher').show();
// var table = $('#mydemo1');
for (var i = 0; i < result.length; i++)
{
doc1=result[i];
if(doc1.PHOTO == "")
{
var elem = document.createElement("img");
elem.setAttribute("src","../common/images/Icon-60.png");
elem.setAttribute("height", "60");
elem.setAttribute("width", "60");
document.getElementById("placeher").appendChild(elem);
}
}
图像文件夹的正确路径是 images/<image file name>
。例如:<img src="images/thumbnail.png"/>
.