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: `

` 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: `

` 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]:
Hmmm. Have you tried giving the inner frame a full, valid structure (....)?

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

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

评论 抢沙发

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

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