-2

let's say taht I have a html code on a variable with only one img on it. And i want to save the img on variable and later on use it with Tesseract. How i am getting this img? ( this is the only img on the doc for sure)

Thanks!

RotemKama
  • 53
  • 5

1 Answers1

1

This would get you the source-uri for the first <img> tag on the document.

alert(document.getElementsByTagName('img')[0].src);
<img src="some_image.png" />
asontu
  • 4,548
  • 1
  • 21
  • 29