`<iframe>` 可以在其中容纳多个页面吗? [英] Can an `<iframe>` hold multiple pages inside of it?
问题描述
我正在创建一个 Wordpress 插件,如果可能的话,我希望将一系列页面链接到外部网站(会员登录),而不是在插件内部重新构建相同页面的副本.
I am creating a Wordpress plugin that if possible, I would like to link to a series of pages to an outside website (an affiliate login), instead of re-building a replica of the same pages inside of the plugin.
我的想法是在 <iframe>
中执行此操作,但由于有多个页面,我不知道这是否可行,或者出于其他原因是否是一个好主意.
My thought was to do this inside of an <iframe>
, but since there are several pages, I do not know if this is possible, or if it's even a good idea for other reasons.
我认为重新构建插件内的页面可能会更好.听起来,尝试使用 可能会遇到很多问题.
I'm thinking it might be better to re-build the pages inside of the plugin. It sounds like there could be a ton of problems trying to do it with an <iframe>
.
推荐答案
单个 iframe 只能指向单个源 - 所以让该源有多个 iframe - 在你的插件文件夹中创建一个新的 html 文件
a single iframe can only point to a single source - so make that source have several iframes instead - make a new html file in your plugins folder
喜欢 yourdomain.com/path_to_your_plugin/new_iframe_holding_file.html
在该文件中放入尽可能多的 iframe,并在插件代码中将 iframe 的 src 属性指向该文件
in that file put as many iframes as you want show up in your plugin and in your plugin code point the src property of your iframe to that file
这篇关于`<iframe>` 可以在其中容纳多个页面吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!