I want to access particular bits of text on a website, using a javascript injection.
Going through the HTML however, i find that most of it is lacking Id’s, and so i do not know how to access the text.
For example, two lines of the HTML are the following:
<td valign="top" width="100%" >
<h1>My example heading</h1>
Would there still be any way of finding out what this text says?
Also, if DO know what that text says, is there any way of finding out the following bit of text…
<td valign="top" width="100%" >
<h1>You are trying to work out:</h1>
<h1>This text</h1>
Oh, that’s not too bad at all. You’ll want to do something like this:
Now, if there were lots of tables, you might need to replace the first line with this:
Read that as: Get table elements, select the third one. Get all of that table’s rows, select the fifth one. Get all that row’s cells. Look for any ones with 100% width and valigned top, and see if they’ve got h1’s.
fiddle: http://jsfiddle.net/JUK5R/26/