Úvod
Jdi na obsah Jdi na menu

...

Struktura stránek

  • Coffee (u0)
  • Tea (u0)
    • Black tea
    • Green tea
      • China
        • Black tea
        • Green tea
          • China
          • Africa
          • China
          • Africa

          • Africa
      • Africa
  • Milk
var j = 0; var i = 0; var all=obj.getElementsByTagName('*'); var alln=all.length; var allnn = alln; ///** dvě stejné délky var chn = obj.childElementCount; var ln; txx = obj.id; var nor = 0; var tab = ""; var k = 0; var allrn = alln - chn; txx = "
0 "+obj.tagName +", chn:"+ chn.toString()+", alln:"+alln.toString()+", allrn:"+allrn.toString() +", allnn:"+allnn.toString()+", id:'"+obj.id+"', class:'"+obj.className+"'"; for(var j= -1,ln=all.length;++j< ln;) { chn = all[j].childElementCount; alln=all[j].getElementsByTagName('*').length; allrn = alln - chn; if (allnn == 0 ) { allnn = alln; } else { if (allrn == 0) { allnn--; } } if ( chn == 0 && allrn == 0 ) { } else { if ( chn !== 0 ) { nor++; } else { nor--; } } if ( alln == 0 && allnn == 0 && chn == 0 ) { nor--; } if ( nor < 0 ) { nor =0; } tab = ""; for (i=0; i" + tab + nor.toString()+" "+all[j].tagName +", chn:"+chn.toString()+", alln:"+alln.toString()+", allrn:"+allrn.toString() +", allnn:"+allnn.toString()+", id:'"+all[j].id+"', class:'"+all[j].className+"'"; } txx = txx + "
/" + obj.id;