View Single Post
Old 07-09-2002, 12:17 PM   PM User | #1
hiuchan
New to the CF scene

 
Join Date: Jul 2002
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
hiuchan is an unknown quantity at this point
Unhappy How to read text in HTML

I tried to post the same subject in the Javascript forum but couldn't get the solution after a couple good members tried to help out. I was advised to post the same question in the DOM Scripting forum so here it is:

My question is, if I want to extract content (text) in a HTML file, how can I do it? For example, part of the HTML file will look like this:

...
<font size="3">
Hello!
</font>
...

I want to know how to extract the word "Hello".

The suggestion I got was to modify the HTML file to use <font id="id name"> and write a few line of Javascript to extract the content "Hello" based on the "id name". However, the most important thing is, I am only allowed to append Javascript function(s) to the **ORIGINALLY EXISTING** HTML file so I can't change the original <font size="3"> tag to <font id="id name"> tag.

Any suggestion please kindly let me know. If you think it is not possible to do it, I would also like to know.

Thanks!
hiuchan is offline   Reply With Quote