-
-
Save KGZM/b8ca3c130dc63fcbb1a4 to your computer and use it in GitHub Desktop.
jQuery Table Extraction Example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var extractTable = function(table) { | |
var output = []; | |
$(table).find('tr').each(function(index, trow) { | |
var row = []; | |
$(trow).find('td').each(function(index, tcell) { | |
row.push($(tcell).text()); | |
}); | |
output.push(row.join(',') + ';'); | |
}); | |
return output.join(''); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment