faqts : Computers : Programming : Languages : PHP : Not Quite PHP : HTML

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

4 of 11 people (36%) answered Yes
Recently 4 of 10 people (40%) answered Yes

Entry

How can I parse everything between <SPAN CLASS="TITLE"> and </SPAN> into an array from a HTML page?
How can I parse everything between <SPAN CLASS="TITLE"> and </SPAN> into an array from a HTML
How can I parse everything between <SPAN CLASS="TITLE"> and </SPAN> into an array from a HTML

Jan 8th, 2003 03:51
Hiroto Sekine, Dries Grobbers,


var coll = document.all.tags( "SPAN" );
var collLen = coll.length;
var strArray = new Array();
var j = 0;
for (var i=0; i<collLen; i++){
    if (coll(i).className == "TITLE"){
        strArray[j++] = coll(i).innerText;
    }
}