0

我使用以下内容加载加载到父站点上的 iframe,但有时,由于加载 iframe,父站点会中断。

这是从书签工具栏上的书签启动的 iframe 代码(如果您想测试它可以工作 - 我没有格式化它,所以可以很容易地添加到书签中进行测试)

javascript:(function(d){var%20modal=document.createElement('iframe');modal.setAttribute('src','http://9ammusic.com/test/bm2.html?url='+encodeURIComponent(window.location.href)+'&page_title='+document.title);modal.setAttribute('scrolling','no');modal.setAttribute('name','my_modal');modal.className='modal';document.body.appendChild(modal);var%20c=document.createElement('link');c.type='text/css';c.rel='stylesheet';c.href='//9ammusic.com/css/iframe.css';document.body.appendChild(c);}(document));

这是 iframe 生成时页面中断的示例。我检查了 css 类名等,没有冲突

http://www.toysrus.co.uk/Toys-R-Us/Learning/Electronic-Learning/LeapFrog-Tag-Junior-Green%280027249%29;jsessionid=C34152146B0577932EBF279B2D26A8D8.app01?searchPosition=10

我很困惑,因为这种情况很少见,但根本不能接受。

任何想法为什么它会破裂?

4

0 回答 0