Spawn a image on another image giving a coordinate
问题 I have some image coordinates and I want to use them to put a small image on those with javascript. Can this be accomplished with javascript or I need to create the div and modify it's css attributes? By the way: the image can be placed anywhere on the page. 回答1: Here is a fully working code: Live Demo CSS .overlays{ position:absolute; } JS function showImage() { // myImage : ID of image on which to place new image var image = document.getElementById('myImage'); console.log(image.width);