Javascript Question
Posted: Mon Aug 20, 2007 7:32 pm
Well, I am trying to use Greasemonkey to not have to see part of a website that I use.
Well, since Greasemonkey uses only Javascript...I am trying to find out what text is inside a <p> in order to either hide it or not. Well the <p> is only given a class, no id or anything. It looks like this:
How can I do this in Javascript? I know how to use ****.getElementById() in Javascript, but this has no id.
I was also thinking that there would be something like ****.paragraphs[0] or something, just like ****.forms[0].
However, I can't find anything on that. Any suggestions/solutions?
Well, since Greasemonkey uses only Javascript...I am trying to find out what text is inside a <p> in order to either hide it or not. Well the <p> is only given a class, no id or anything. It looks like this:
Code: Select all
<p class="error">Some text here.</p>
I was also thinking that there would be something like ****.paragraphs[0] or something, just like ****.forms[0].
However, I can't find anything on that. Any suggestions/solutions?