Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Feb 3rd, 2011  |  syntax: JavaScript  |  size: 0.24 KB  |  views: 76  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1.  
  2.  
  3. function main(){
  4.         var a = document.getElementsByTagName('a');
  5.         for (i = 0; i < a.length; i++) {
  6.                 if(a[i].parentNode.tagName == 'Td'){
  7.                         var team = a[i].innerHTML;
  8.                         team.sort();                                                   
  9.                 }
  10.                 else{
  11.                         i++;
  12.                 }
  13.                                
  14.         }
  15.                
  16.                
  17. }
clone this paste RAW Paste Data