We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No description provided.
The text was updated successfully, but these errors were encountered:
Sorry, something went wrong.
const tmp = new Set() Array.prototype.slice.call(document.querySelectorAll("*")).forEach(v => { const tagName = v.tagName.toLowerCase() if (tagName[0] === 's' || tagName[0] === 'h') { tmp.add(v.tagName) } }) console.log(tmp);
二维码挂了
const printTags = () => { const body = document.getElementsByTagName("body")[0]; const tags = new Map(); const dp = node => { if (node.tagName.startsWith("S") || node.tagName.startsWith("H")) { if (tags.has(node.tagName)) { const value = tags.get(node.tagName); value.push(node); tags.set(node.tagName, value); } else { tags.set(node.tagName, [node]); } } if (node.children.length > 0) { for (let index = 0; index < node.children.length; index++) { const child = node.children[index]; dp(child); } } }; dp(body); tags.forEach((nodes, key) => { console.log(`key: ${key}, 共: ${nodes.length} 个`); nodes.forEach(node => { console.log(node); }); }); }; printTags();
No branches or pull requests
No description provided.
The text was updated successfully, but these errors were encountered: