12 lines
		
	
	
		
			334 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			12 lines
		
	
	
		
			334 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
export function setResultImage(name) {
 | 
						|
    let imgElement = document.createElement('img');
 | 
						|
    imgElement.src = `${window.IMG}/${name }.jpg`;
 | 
						|
    console.log(imgElement.src);
 | 
						|
    imgElement.onerror = function () {
 | 
						|
        this.src = `${window.IMG}/404.jpg`;
 | 
						|
    };
 | 
						|
    resultSection.appendChild(imgElement);
 | 
						|
    return imgElement;
 | 
						|
}
 | 
						|
 |