[Greasemonkey] Grab text string in TD

Julien Couvreur julien.couvreur at gmail.com
Thu Apr 21 16:39:13 EDT 2005


On 4/21/05, Dave <relaxedguy at gmail.com> wrote:
> I GetElements ByTagName, then for each one:
>  if (td1.getAttribute('value').match(/^Special/))

Looking at a table using the DOM inspector (see Tools menu in
Firefox), you'll see that the text contained in the TD is actually
stored in a sub-node of the TD, not in an attribute on the TD node.
There may be more than one sub-node under that TD, if you don't simply
put text in your table, but some html formatted text (bold text,
links,...) in there too.

Cheers,
Julien


More information about the Greasemonkey mailing list