This is easy in jquery but how about plain javascript?
The code is for the Google image search API. I want to search images that match the html or preferably text inside a div.
var searchThis = document.getElementById('imgToFind'); //get HTML, or text from div
// Find images
imageSearch.execute(searchThis); //search image
The HTML
<div id="imgToFind">PlayStation</div>
The result should be images of playstation. Instead I get these
dosic ois - 123
IE8 javascript returns [object HTMLDivElement] instead [
Loving Hand
And other irrelevant images. I wonder what Google searches for.. think the second one is giving me a hint.