// 获取整个HTML文档中的所有标签
var allTags = document.getElementsByTagName('*');
// 循环遍历所有标签
for (var i = 0; i < allTags.length; i++) {
var tag = allTags[i];
// 检查标签的innerHTML或textContent是否包含所需的值
if (tag.innerHTML.includes('你要搜索的值') || tag.textContent.includes('你要搜索的值')) {
// 找到包含所需值的标签
console.log('找到包含所需值的标签:', tag);
}
}
接脚本定制
I frequently record, because want to leave something.