使用通配符按名称选择元素 [英] Selecting elements by name with wildcards
本文介绍了使用通配符按名称选择元素的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
使用通配符按名称选择元素的好方法是什么?
Whats a good way to select elements by their name using wildcards?
网站上的元素名称以<a_1786439></a_1786439>
的形式出现,很可能会自动生成.这可以通过xpath来实现,但是可以使用更快的css选择器或jquery选择器来实现吗?
The website has element names in the form of <a_1786439></a_1786439>
which are likely auto-generated. This is doable by xpath, but is it doable using css selectors or jquery selectors which are faster?
这显然是糟糕的编码,但是该网站不是我的,我正在为其编写用户脚本.
This is clearly terrible-coding, but the website is not mine, and I'm writing a userscript for it.
推荐答案
This doesn't exist in CSS3, as the spec's section on type selectors only includes names and wildcards, but no combinations of them.
这篇关于使用通配符按名称选择元素的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文