let hdr=null; for (const el of document.querySelectorAll('div,table')) { const x=(el.innerText||''); if (/序号/.test(x) && /错误对象/.test(x) && x.length<200) { hdr=el; break; } } if(!hdr) return {err:'no header'}; const info=[]; let box=hdr; for (let i=0;i<6&&box.parentElement;i++) { box=box.parentElement; info.push({i, tag:box.tagName, cls:String(box.className).slice(0,60), len:(box.innerText||'').length, txt:(box.innerText||'').replace(/\s+/g,' ').slice(0,200)}); } return {info};