Theres not really any good way to do this in javascript.

First, you'd have to find out the type of element on the page (eg table). Then you'd have get the innerText of the element to find out what the text contained is... something like this

tableitem = document.table.rows[0].cells[0].innerText;

The best way to do a search is to use a server side script. Do a search for a Perl/CGI search in a search engine