How can I select all elements in an HTML document with a specific class and specific element type?
I am trying to select all the class anchors title loggedinfrom an HTML document (and then open them in a browser). They are inside the class paragraphs title.
They are leaves in the following DOM tree:
+ body
+ div class='content'
+ div id='siteTable' class='sitetable linklisting'
+ div class='thing id-t3_xxxx xxx xxx link'
+ div class='entry unvoted'
+ p class='title'
+ a class='title loggedin '
Where xindicates the contents of the variable.
(I want to do this in raw JavaScript, i.e. not in jQuery.)
source
share