How can i get the image or image url on select that image using javascript, any examples?
Thanks Manoj
Your question is far from clear, but assuming an image with an id
of myImage
, and assuming that by "select" you mean "click", you can do this:
document.getElementById("myImage").onclick = function() {
console.log(this.src);
}
Here's a working example. Clarify your question and I can clarify my answer.