Looks like it's absolutely impossible with JavaScripts from back then
@wallhackio > will only return an HTML element reference if the element is a <layer> or a <div> with [...]
Unfortunately, what I wanted to do is to getElementById a <LINK>, so that I could change its HREF (the stylesheet that it points to)...
JavaScript is a path of despair and I need to find some other way to do this that doesn't involve attempting to write a JavaScript that works on Netscape 4 and Internet explorer and Firefox
@vaporeon_ someone else in the forum I shared a screenshot from mentioned they had code specifically for locating elements relative to <a> tags but the link is broken and the wayback machine couldn't retrieve it
So what you're trying to do should be possible