内容区(links.html)

<html>
<body>
<h2>Chapter 1</h2>
<p>This chapter explains ba bla bla</p>

<h2>Chapter 2</h2>
<p>This chapter explains ba bla bla</p>

<h2>Chapter 3</h2>
<p>This chapter explains ba bla bla</p>

<h2><a name="C4">Chapter 4</a></h2>
<p>This chapter explains ba bla bla</p>

<h2>Chapter 5</h2>
<p>This chapter explains ba bla bla</p>

<h2>Chapter 6</h2>
<p>This chapter explains ba bla bla</p>

<h2>Chapter 7</h2>
<p>This chapter explains ba bla bla</p>

<h2>Chapter 8</h2>
<p>This chapter explains ba bla bla</p>

<h2>Chapter 9</h2>
<p>This chapter explains ba bla bla</p>

<h2><a name="C10">Chapter 10</a></h2>
<p>This chapter explains ba bla bla</p>

<h2>Chapter 11</h2>
<p>This chapter explains ba bla bla</p>

<h2>Chapter 12</h2>
<p>This chapter explains ba bla bla</p>

</body>
</html>

导航区(contents.html)

<!DOCTYPE html>
<html>
<body>
<p>
    <a href="links.html#C4" target="showframe">查看 Chapter 4。</a>
</p>
<p>
    <a href="links.html#C10" target="showframe">查看 Chapter 10。</a>
</p>

</body>
</html>

框架跳转(index.html)

<!DOCTYPE html>
<html>
<head>
    <meta charset=” utf-8” >
    <title>HTML框架跳转至指定节</title>
</head>
<!-- 注意:frameset不要和body放在同一个html文件内 -->
    <frameset cols="25%,75%">
        <frame src="contents.html">
        <frame src="links.html" name="showframe">
    </frameset>
    <!-- <noframes>设置不支持frame的浏览器 -->
    <noframes>
        <body>您的浏览器无法处理框架!</body>
    </noframes>
</html>
12-23 04:22