Searching for words in a text box

Hi all, hope you can help a total novice getting to grips with things.

I’m in the process of writing a page that searches a text box for matching words entered by the user. I have an input text box and a dynamic box containing a paragraph of text, if a word is typed into the input box and it also exists within the paragraph of text I would like it highlighting (in the paragraph).

So far I am struggling. I have been looking at the ‘selection’ object but I really don’t know what I should be doing with it :sigh:

Any help would be greatly apprecaited.