Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
嘿,我是否可以在定义框架的同一页面中插入框架的源代码。
就像不给文档提供位置一样,我可以在框架标签中插入源代码吗?
问题是我正在调用一个函数,该函数在其他页面中无效。所以我必须在同一页面中调用它,知道吗?
我认为你可以用data:标签做到这一点。
data:
<iframe src="data:<source of the page>">. 这就是雅虎对图像的推荐方式,所以我希望它在源代码中的工作方式可能相同。
<iframe src="data:<source of the page>">
另一个想法是您可以创建一个没有源的空框架,然后使用 Javascript/jQuery 添加 HTML。