开发者

How to copy element from an iframe into main DOM in IE7 using jquery

I'm trying to move an html element from within an iframe with some event handlers attached (attached using jquery) to the main DOM of the page.

e.g.

var elem = $('iframe').contents().find('span');
elem.detach();
$(document.body).append(elem);
..

It seems to be fine in Chrome and FF, but in IE7 I get an "Inval开发者_运维问答id Argument" error being thrown.

If anyone knows some trick to do this that would be great.

Ta


If the two elements are in different domains you will get cross domain errors.

read this article it might help solve your problems

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜