简体   繁体   English

使用 iframe 在我的页面内加载 3 个 url

[英]load 3 url inside my page using iframe

I want to show 3 urls inside my page with this code as you can see here:我想使用此代码在我的页面中显示 3 个网址,如下所示:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN"
   "http://www.w3.org/TR/html4/frameset.dtd">
<HTML>
<HEAD>
<TITLE>A simple frameset document</TITLE>
</HEAD>
<FRAMESET cols="20%, 80%">
  <FRAMESET rows="100, 200">
      <FRAME src="http://www.asriran.ir">
      <FRAME src="http://www.google.com">
  </FRAMESET>
  <FRAME src="http://www.yahoo.com">

</FRAMESET>
</HTML>

But when i run my page just one url is loaded why ?但是当我运行我的页面时只加载了一个 url 为什么? 在此处输入图片说明

The pages you are trying to load ie Yahoo and Google do not allow that by their X-frame-options.您尝试加载的页面,即 Yahoo 和 Google,它们的 X-frame-options 不允许加载。

So, it is virtually impossible now.所以,现在几乎是不可能的。

Note: HTML5 has depreciated the use of frameset and frame tags.注意:HTML5 已经贬低了框架集和框架标签的使用。 Browsers like Google Chrome (which are widely used) are switching completely to HTML5.像谷歌浏览器(被广泛使用)这样的浏览器正在完全切换到 HTML5。 So if possible, do not use framesets所以如果可能的话,不要使用框架集

Some web servers are preventing iframes for a security purpose.出于安全目的,一些 Web 服务器正在阻止 iframe。 So, you can"t open it in the frame所以,你不能在框架中打开它

最后我安装了谷歌浏览器和 iframeallow 扩展。之后一切正常。

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

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