简体   繁体   English

iframe会阻止javascript工作

[英]iframe stops javascript from working

I'm having a problem with an iframe on a website that i'm building of the adminLTE template (based on bootstrap) You can find an example version of this template here: http://almsaeedstudio.com/AdminLTE/ 我正在构建adminLTE模板(基于引导程序)的网站上的iframe出现问题。您可以在此处找到此模板的示例版本: http : //almsaeedstudio.com/AdminLTE/

When i include an iframe in a blank page, all the animated controls stop working (like the collapsing charts, UI elements, forms buttons on the example page) 当我在空白页面中包含iframe时,所有动画控件都将停止工作(例如示例页面上的折叠图表,UI元素,表单按钮)
As soon as i place an iframe tag with a src in it (on line 405 of the code on the example page below) it stops responding. 一旦我在其中放置了带src的iframe标签(在下面的示例页上的代码的第405行),它就会停止响应。

In terms of code: everything is mostly like in the template, on this page: http://almsaeedstudio.com/AdminLTE/pages/examples/blank.html 在代码方面:此页面上的所有内容几乎都与模板中的内容相似: http : //almsaeedstudio.com/AdminLTE/pages/examples/blank.html

The differences with my code are: 与我的代码的区别是:
- i do not have the small settings widget to the right -我没有右侧的小设置小部件
- i don't load the demo.js -我不加载demo.js
- im using asp.net with a setup where everything is in a master page, and the content is everything from line 389 to line 409 -我使用asp.net进行安装,所有内容都在母版页中,内容从389行到409行

Let me know if i should explain anything else in more detail. 让我知道我是否应该更详细地解释其他事情。

Thanks!! 谢谢!!

I was self-closing the iframe ( <iframe /> ) while i should have closed it with </iframe> 我应该自行关闭iframe( <iframe /> ),而应该用</iframe>关闭它

I found this by following john Smith's advice to go and check the console output. 我是按照约翰·史密斯(John Smith)的建议去检查控制台输出来发现的。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM