Home  • University • Campus

Link between anchor element and iframe element using target and name attribute.

<!DOCTYPE html>
<html>
<body>

<iframe width="100%" height="300px" src="" name="iframe_container"></iframe>

<a href="http://prothom-alo.com" target="iframe_container">Prothom-alo</a> | 
<a href="" target="iframe_container">VCampus</a>


</body>
</html>
Using CSS
<!DOCTYPE html>
<html>
<head><title>App</title>
<style>
 body{margin:0px;}
 ul{list-style:none}
 a{text-decoration:none}
 a:hover{color:#FF0}
</style>
</head>
<body>

<div style="width:1100px; margin:0px auto; background-color:#CCC;">
    <div style="float:left;width:200px;">
        <ul>
        <li><a href="http://prothom-alo.com" target="iframe_container">Prothom-alo</a></li> 
        <li><a href="" target="iframe_container">VCampus</a></li>
        </ul>
    </div>
    <div style="float:left;width:890px;">
     <iframe style="border:none;" width="100%" height="900px" src="" name="iframe_container"></iframe>
    </div>
    <br style="clear:both"/>
</div>
</body>

Comments 6


Thank u madam
tnx Mam
Hi.....Mam.......I also a J2EE..........student//&nbps;<br />
<p>How R you...........!!!<p/>
Thanks
Happy

Share

About Author
Zinia Islam
Copyright © 2024. Powered by Intellect Software Ltd