不使用 jQuery 选择元素

2023-12-23

我猜这会被否决,因为它没有包含足够的 jQuery,但它就在这里:)

What is the most effective way to get the element(s) returned by the jQuery selector below using plain old javascript?

$('a[title="some title text here"]', top.document)

如果您使用的是现代浏览器,您可以使用以下命令:

window.top.document.querySelectorAll('a[title="some title text here"]')
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

不使用 jQuery 选择元素 的相关文章

随机推荐