If I understand your question, you ask if the user is allowed to enter a query that will look for the text of the page on which they are located?
Can you do this. I would suggest looking into one of the javascript libraries, jQuery is my library of choice for your functionality. It has rich selector syntax that allows you to easily search for different parts of the page and not worry about cross-browser coding.
source share