|
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!
|