Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Select specific text Like in HTML Help

0 views
Skip to first unread message

Trevor Benedict R

unread,
Oct 11, 2001, 4:25:12 AM10/11/01
to
Hi,
I would like to know if it's possible to select specific text after the page is loaded. I just had this brush after
seeing the Compiled Html files. When we do a search, all the words that match the criteria are selected. How can I
accomplish this using a web browser. Preferably IE. Any references or ideas would be appreciated.

Trevor Benedict R
Software Engineer
Mastech Malaysia Sdn Bhd

henkehus

unread,
Oct 11, 2001, 9:28:10 AM10/11/01
to
Trevor,

You could use the replace method to set for example another color on the
search words:

document.body.innerHTML = document.body.innerHTML.replace(searchword,"<SPAN
STYLE='background:yellow'>" + searchword + "</SPAN>")

/henkehus

"Trevor Benedict R" <*trevor_benz*@yahoo.com> wrote in message
news:eYpCN5iUBHA.1680@tkmsftngp07...

Trevor Benedict R

unread,
Oct 24, 2001, 5:04:06 AM10/24/01
to
Thanks Pal.

Trevor Benedict R
Software Consultant
Western Digital Malaysia

"henkehus" <henk...@hotmail.com> wrote in message news:uKsZbilUBHA.1384@tkmsftngp03...

0 new messages