Disclaimer: This article is a blogger original article, follow the CC 4.0 BY-SA copyright agreement, reproduced, please attach the original source link and this statement.
Record this line of code to deepen the learning-based.
new Set([...document.querySelectorAll('*')].map(index => index.tagName))
Test results are as follows: