I create a picture like this:
function(file,dataUrl){ var date = new Date(); var path = window.location.host+'/frontend/web/image/page/'+date.getFullYear()+'/'+(1+date.getMonth())+'/'+file.name; var img = document.createElement('img'); img.src = path; document.getElementById('forIMG').appendChild(img);} But it is not displayed on the page, or rather displayed like this:
The address I checked the picture is.
I am trying to get the data for the image like this:
$("#forIMG").on('click','img',function () { console.log($(this)); }); Got nothing, what's wrong?
