ページ内に別ページを表示

<html>
<head>
<title>iframeサンプル</title>
</head>
<body bgcolor="#ffffff">
<p>iframeタグでページ内に読み込み!</p>
<a href="http://takaq1.plala.jp/contents/homepage/html/index.htm" target="framepage">
HTMLのお勉強</a>
<a href="https://www.goo.ne.jp/" target="framepage">
goo</a>
<a href="https://www.yahoo.co.jp" target="framepage">
Yahoo</a>
<a href="https://www.google.com/" target="framepage">
Google</a>
<a href="https://www.biglobe.ne.jp" target="framepage">
biglobe</a>
<br>
<iframe src="https://takaq1.plala.jp/contents/homepage/html/index.htm" name="framepage" width="800" height="400">
</iframe>
</body>
</html>

実行結果はここを クリックしてください。実行後はブラウザの×をクリックして閉じてください。

iframeタグを使 用してページ内にHTMLファイルを読み込 んでいます。
ここでのname属性はフレーム名ですwidthは横幅、heightは 縦幅です、後は前の項目で解説したようにtargetで フレーム名にリンクをすればiframe内を切り替える 事が出来ます。