如何确保页面上的 iFrame 首次加载后出现
我对 PHP 的网页开发和网页设计领域还很陌生,但我希望有人能帮助我解决我的问题。
我正在我的 PHP 驱动的网站上加载一个特定页面,该页面从页面中心其他位置的另一个页面加载 iframe。我想知道是否有人知道如何在 iframe 加载后加载整个页面。在 iframe 加载之前只需要一两秒的时间,但这需要看起来尽可能专业。
我将不胜感激任何帮助。我还想向你们保证,虽然这是我的第一个问题,但我知道 Stack Overflow 是如何运作的,因为我最好的朋友之一是这里的贡献者,他总是告诉我,当人们不回应或给予时,这是多么烦人指出了很好的答案,所以我想向你保证我会这样做。
再次感谢。 史蒂夫.
I'm pretty new to the world of web developing and web design in PHP, but I was hoping that someone could help me with my question.
I am loading a particular page on my PHP powered website which loads an iframe from another page elsewhere in the center of the page. I was wondering if anyone knows how to only get the whole page to load once the iframe has loaded. It's only a matter of a further one or two seconds before the iframe loads, but this needs to look as professional as possible.
I'd appreciate any help. I'd also like to assure you guys that although this is my first question, I know how Stack Overflow works as one of my best friends is a contributors here and he's always telling me how annoying it is when people don't respond or give points to good answers, so I'd like to assure you that I will do that.
Thanks again.
Steve.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
使用 JQuery。您无法在 PHP 中执行此操作,因为这是客户端问题。
看:
动态插入的 iframe 中的 jQuery .ready
Use JQuery. You won't be able to do this in PHP, as it's a client side issue.
See:
jQuery .ready in a dynamically inserted iframe