Here is the code for inserting div element at Mouse Click in web page function test(e){ var d=document.createElement("div"); d.innerHTML="<img src=' http://static.springsource.org/spring/docs/2.0.x/images/admons/note.png '></img>"; d.style.display="block"; d.style.position="absolute"; d.style.left=(e.clientX+window.pageXOffset)+"px"; d.style.top=(e.clientY+window.pageYOffset)+"px"; d.display="block"; console.log(window); var b=document.getElementsByTagName("body"); b[0].appendChild(d); } document.onclick=test; This e-Mail may contain proprietary and confidential information and is sent for the intended recipient(s) only. If by an addressing or transmission error this mail has been misdirected to you, you are requested to delete this mail immediately. You are also hereby notified that any use, any form of reproduction, dissemination, copying, disclosure, modification, distribution and/...