Reputation: 21
Suppose I'm looking for all <a onclick=...>
that call the String.fromCharCode
javascript code. What's the simplest way to find all of them?
Upvotes: 2
Views: 742
Reputation: 53879
You could use contains()
:
doc.xpath('//a[contains(@onclick, "String.fromCharCode")]')
Upvotes: 3