开发者

window.frames['myframe'] gives me an error in Firefox?

开发者 https://www.devze.com 2023-03-13 00:13 出处:网络
$(window.frames[\'myframe\'].document.getElementById(\'frameid\')) This statement sometimes returns nu开发者_C百科ll in Firefox but working properly in any other browsers. What can be the problem ?
$(window.frames['myframe'].document.getElementById('frameid'))

This statement sometimes returns nu开发者_C百科ll in Firefox but working properly in any other browsers. What can be the problem ?

Thanks in advance,


By the looks of it you simply need to change the selector it should be

$('#myframe').contents().find('#frameid').html();

JQuery handles the finding of it, take a look at selectors in jQuery Selectors

0

精彩评论

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