internet explorer 8 truncates iframe contents

**[the demo is here][1]** (can't reproduce it on jsfiddle, since they don't allow ajax to sufficient extent) Imagine, you have iframe on your page `/some/url` returns simple text: `
text

` And also, once iframe is loaded, you access its contents from Javascript. var io = document.getElementById('if1'); alert(io.contentWindow.document.body.innerHTML); Normal browsers, obviously, return content exactly as it is. But internet explorer 8 returns something funny text
Even though right-click/view-source on iframe shows correct content: `
text

` I didn't try other IE versions. Did you see this issue before? This is a very simplified version of the problem I've met while adapting webapp to IE. Basically, I do ajax requests through iframe (not xhr, I need to upload files) and html fragments are returned. Thanks a lot! [1]: http://brazilwide.com.br/debug/iframe_issue.html
Hmmm. Have you tried giving the inner frame a full, valid structure (....)?

以上就是internet explorer 8 truncates iframe contents的详细内容,更多请关注web前端其它相关文章!

赞(0) 打赏
未经允许不得转载:web前端首页 » JavaScript 答疑

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

前端开发相关广告投放 更专业 更精准

联系我们

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏