开发者

Selecting multible elements by ID (each one has unique ID)

I have multiple elements on page and all of them have unique id something like that: title_1, title_2, title_n etc.

<a href="http://link" id="title_1">Link name&l开发者_JAVA技巧t;/a>
<a href="http://link" id="title_2">Link name</a>
<a href="http://link" id="title_n">Link name</a>

Is this correct syntax for selecting these links?

a[id^=title]

IT seems to be not working.

Reference: http://jsoup.org/apidocs/org/jsoup/select/Selector.html


remove that dot

a[id^=title]
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜