View Single Post
Old 07-09-2002, 07:23 PM   PM User | #4
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
Yes, this will solve my problem. In my HTML page, I will always have one and only one special content after the font tag which I need to locate and it will stay the same each time. In my example, I used the word "Hello" to represent this special static content.

Therefore the getElementsByTagName('font') will work if I add the for loop:

var test=document.getElementsByTagName('font');
for (var i=0; i<test.length; i++) {
if (test[i].innerHTML == 'Hello')
alert(test[i].innerHTML);
else
alert('no found yet');
}

Hmmm...I guess I am right?! Thanks for your help, guys!
hiuchan is offline   Reply With Quote