使用<对象>或者<iframe>在链接中

Reload the page with the <object > or <iframe> in a link

本文关键字:gt lt 链接 或者 对象 使用 iframe      更新时间:2023-09-26

我试图创建一个链接,如果我在<0对象>或者<iframe>我会更改我单击的相应链接。并显示活动链接

示例:

这是我的链接

链接:A B C D

<这个我的对象加载显示>

如果我点击链接A,就会调用网页A。

<object width="1225px" height="1000px" data="http://webpage A/"></object> 

如果我点击B,那么该对象将调用<B>等等

<object width="1225px" height="1000px" data="http://webpage B/"></object>

一页

示例:

<div class='konten'>
    <div class='tab'>
        <h1>EGLG Chr: 
        <a href ="http://10.88.25.48/sbc-portal/eglg_chr1> 
        <a href ="http://10.88.25.48/sbc-portal/eglg_chr2">2</a> 
        <a href ="http://10.88.25.48/sbc-portal/eglg_chr3">3</a> 
        <a href ="http://10.88.25.48/sbc-portal/eglg_chr4">4</a> 
        <a href ="http://10.88.25.48/sbc-portal/eglg_chr5">5</a> 
        <a href ="http://10.88.25.48/sbc-portal/eglg_chr6">6</a> 
        <a href ="http://10.88.25.48/sbc-portal/eglg_chr7">7</a> 
        <a href ="http://10.88.25.48/sbc-portal/eglg_chr8">8</a> 
        <a href ="http://10.88.25.48/sbc-portal/eglg_chr9">9</a> 
        <a href ="http://10.88.25.48/sbc-portal/eglg_chr10">10</a> 
        <a href ="http://10.88.25.48/sbc-portal/eglg_chr11">11</a> 
        <a href ="http://10.88.25.48/sbc-portal/eglg_chr12">12</a> 
        <a href ="http://10.88.25.48/sbc-portal/eglg_chr13">13</a> 
        <a href ="http://10.88.25.48/sbc-portal/eglg_chr14">14</a> 
        <a href ="http://10.88.25.48/sbc-portal/eglg_chr15">15</a> 
        <a href ="http://10.88.25.48/sbc-portal/eglg_chr16">16</a> 
        </br>
        </h1>
        <object width="1225px" height="1000px" data="reload if i click link"></object> 
    </div>
</div>

我想最简单的方法就是用JS/jQuery更改<object>标记或<iframe>的属性。

例如:

<a href="http://www.bing.com/" onclick="return false;">Bing</a> 

jQuery:

$("a").click(function() {
    $("iframe").attr("src", $(this).attr("href"));
});

参见工作示例(JSFiddle)。