Assume I have the following code:
<div class"foobar">
....
<a class="aaa" .....> .... </a>
....
</div>
Now I want to completely replace the <a> element (including child stuff) by another.
I have no access to the original html code but want to modify it afterwards by Greasemonkey script.
However the following does not work:
var address = document.URL;
var div = document.getElementsByClassName("foobar.aaa")[0];
div = "<a href=\"" + address + "\">" + address + "</a>";
How else does that work?
Peter




Reply With Quote


ldelem = document.getElementsByClassName('foobar a.aaa')[0];
