provided by: 
Originally published at Internet.comAround the Script in 80 Tips...
Last week we hit upon the doit() function. That function is actually sitting inside of a larger function named DelHTML(). You can probably guess that the name is shorthand for "Delete HTML". Today we'll figure out how it works and wrap this script up.
The Script's Effect
-----------------------------------
Here's the Code
As always, it's easier to understand these functions and scripts if you understand the overriding reason for their existence. What does the author want this function to do?
The purpose of the script is to eliminate all of the HTML tags and return just the text. That's not that hard of a job because we know that every tag begins with < and ends with >. So we need to create a function that will look for < and > and return to use everything except those characters and what is inside them.
The process must take place time and time again in order to eliminate all tags. First you eliminate the first html tag, then return all the leftover text and work on it eliminating the next tag. Then you return all of the remaining text and work on that eliminating the next tag. It goes on until all the tags are gone...
Read article at Internet.com site