For example:
$(elementid,top.document).attr(attributeName)
or
$(elementid,parent.document).attr(attributeName)
Try
$(elementid,window.parent.frames[0].document).attr(attributeName)
What are you trying to achieve - perhaps giving the question in context will get you better solutions.
What about:
window.parent.$(elementid).attr(attributeName);
And don't forget document.domain = "yourdomain.com"
before running $(selector, parent.document)
because I ran into "access denied" issues just like location.href
for iframes
Try this:
$("#myid", top.document);
or
$("#myid", parent.document.body);
Ref