0

Can I get The URL For An Image I browsed it by Input type field with JavaScript?

I am Working in a Plugin So I want to get the SRC for the image I browsed it with the input type="file" so, Is there any Way to return the src ==> as "home/files/icon/..." ?

thanks Alot :) :)

1 Answers1

0

Yes,

If the image tag has id attribute, you can get as below.

document.getElementById("imgId").src;
Manjunath D R
  • 371
  • 2
  • 8