开发者

jquery html() problems in CHROME

I have an Iframe inside my HTML. From that Iframe I'm accesing to the parent window to retrieve the HTML code of a DIV with an ID=result

Everythin开发者_开发技巧g works in FF3, FF5 and IE8, but not in Chrome 12. Code in Iframe is:

message = $(document, parent.window.document).contents().find('#resultsubmit').html();

However, if I remove html() method Chrome yes is returning a valid object (html object)

But as soon as I add html() to read de html inside an error happens.

Any clue about that?


use this:

var message = $(parent.window.document).contents().find('#message').html();
$('#target').html(message);
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜