javascript - How to get a div's content from the current page and Google it? -


i thinking using jquery, inexperienced when comes chrome extensions , javascript. need div off of page (with id, it's static, content dynamic) when user clicks button. i'm having trouble grabbing contents current page, , wondering if either give me tips or direct me relevant answer/tutorial.

thanks.

if want submit contents of div query google, simple 1 liner do, no jquery needed.

window.location = 'http://www.google.com/search?q='+encodeuricomponent(document.getelementbyid('theid').innerhtml); 

Comments