Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

why I can not insert image with ajax request

            

        var img = document.querySelector('.i');
            img.setAttribute('src','data/'+e[0]);
             function loadImage() {
            context.drawImage(img,0,0)     
            console.log('Yes');  
             }     
             setTimeout(loadImage,100); // set timeout so that the code can take few moment to load;
 
PREVIOUS NEXT
Tagged: #I #insert #image #ajax #request
ADD COMMENT
Topic
Name
2+6 =