2024-07-16 22:44:46 +00:00
|
|
|
export function setResultImage(name) {
|
|
|
|
let imgElement = document.createElement('img');
|
2024-07-16 23:50:14 +00:00
|
|
|
imgElement.src = `${window.IMG}/${name }.jpg`;
|
2024-07-16 22:44:46 +00:00
|
|
|
console.log(imgElement.src);
|
|
|
|
imgElement.onerror = function () {
|
2024-07-16 23:50:14 +00:00
|
|
|
this.src = `${window.IMG}/404.jpg`;
|
2024-07-16 22:44:46 +00:00
|
|
|
};
|
|
|
|
resultSection.appendChild(imgElement);
|
|
|
|
return imgElement;
|
|
|
|
}
|
|
|
|
|