如何在firefox中使用JQuery访问parent.document元素? [英] How to access parent.document elements using JQuery in firefox?

查看:142
本文介绍了如何在firefox中使用JQuery访问parent.document元素?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



  $(elementid,top.document).attr(attributeName)


$或b
$ b $ $ p $ $(elementid ,parent.document).attr(attributeName)

可在IE或Chrome中使用,但无法使用Firefox。



有人知道firefox的等价性是什么吗?

谢谢!

解决方案

那么:

  window.parent。$ (elementid).attr(的attributeName); 


For example:

$(elementid,top.document).attr(attributeName)

or

$(elementid,parent.document).attr(attributeName)

works in IE or Chrome but doesn't work in Firefox.

Does anyone know what the firefox equivalence is?

Thanks!

解决方案

What about:

window.parent.$(elementid).attr(attributeName);

这篇关于如何在firefox中使用JQuery访问parent.document元素?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆