列表格式显示
广告招商中...... 联系方式!
私信 +好友
function findElementWithText(text) {
const elements = document.querySelectorAll('*'); // 获取所有元素
let foundElement = null;
elements.forEach(function(element) {
if (element.textContent.includes(text)) {
foundElement = element;
return; // 找到后退出循环
}
});
return foundElement; // 返回包含文字的元素,如果没有找到则返回 null
var el_order=findElementWithText("价格从低到高");
if (el_order!=null)
el_order.click()
本页Html网址:/htmlsoft/619365.html
本页aspx网址:/soft.aspx?id=619365&bianhao=202406231815321589_98574&kind1=&kind2=
最后访问时间:
上一篇:JavaScript 如何实现滚动到指定元素位置的功能?
下一篇:getBoundingClientRect();
增加