如何通过 iframe / ahref 嵌入其他网站?

web*_*org 0 html iframe

我有 html 网站 - 我想执行以下操作

-----------------------------
Link1 website1     | 
Link2 website2     | Mysite
Link3 website3     |
-----------------------------
Run Code Online (Sandbox Code Playgroud)

正如您所看到的,在右侧,内容将是静态的 - 它来自我的网站。

左侧有 3 个链接(a href) - 指向三个不同的域。

现在如何确保当我点击 link1 时,显示 website1 内容

---------------------------------
            | 
Website1    | Mysite
            |
---------------------------------
Run Code Online (Sandbox Code Playgroud)

如果单击 link2,将显示 Website2 内容。

额外问题:像这样嵌入其他网站,会对我的网站造成任何安全威胁吗?

谷歌给了我这个:

看这里

但与我的要求略有不同

Ram*_* Gh 5

您应该首先为您的 iframe 命名,然后将链接定位到该 iframe

例子:

<iframe src="external.htm" name="iframe"></iframe>
<a href="http://stackoverflow.com" target="iframe">SO</a>
Run Code Online (Sandbox Code Playgroud)

参考: