欢迎来到虫虫下载站 | 资源下载 资源专辑 关于我们
虫虫下载站

html_frames.asp@output=print

W3Schools tutorial..web designing
ASP@OUTPUT=PRINT
字号:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en-US" xml:lang="en-US" xmlns="http://www.w3.org/1999/xhtml">
<head>

<title>HTML Frames</title>
 
<link rel="shortcut icon" href="../favicon.ico" type="image/x-icon" />
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<meta name="Keywords" content="xml,tutorial,html,dhtml,css,xsl,xhtml,javascript,asp,ado,vbscript,dom,sql,colors,soap,php,authoring,programming,training,learning,beginner's guide,primer,lessons,school,howto,reference,examples,samples,source code,tags,demos,tips,links,FAQ,tag list,forms,frames,color table,w3c,cascading style sheets,active server pages,dynamic html,internet,database,development,Web building,Webmaster,html guide" />

<meta name="Description" content="Free HTML XHTML CSS JavaScript DHTML XML DOM XSL XSLT RSS AJAX ASP ADO PHP SQL tutorials, references, examples for web building." />

<meta http-equiv="pragma" content="no-cache" />
<meta http-equiv="cache-control" content="no-cache" />

<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "../../https@ssl./default.htm" : "../../www./default.htm");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-3855518-1");
pageTracker._initData();
pageTracker._trackPageview();
</script>

</head>
<body>

<p>From <b>http://www.w3schools.com</b> (Copyright Refsnes Data)</p>


<h1>HTML Frames</h1>
<a href="html_links.asp"><img border="0" src="../images/btn_previous.gif" width="100" height="20" alt="Previous" /></a>
<a href="html_tables.asp"><img border="0" src="../images/btn_next.gif" width="100" height="20" alt="Next" /></a>
<hr />

<p class="intro">With frames, you can display more than one Web page in the same
browser window.</p>
<hr />

<h2>Examples</h2>

<p><a target="_blank" href="tryit.asp@filename=tryhtml_frame_cols">Vertical frameset</a><br />
This example demonstrates how to make a vertical frameset with three different
documents.
</p>

<p><a target="_blank" href="tryit.asp@filename=tryhtml_frame_rows">Horizontal frameset</a><br />
This example demonstrates how to make a horizontal frameset with three different
documents.</p>

<p>(You can find more examples at the bottom of this page)</p>

<hr />

<h2>Frames</h2>

<p>With frames, you can display more than one HTML document in the same browser
window. Each HTML document is called a frame, and each frame is independent of
the others.</p>

<p>The disadvantages of using frames are:</p>

<ul>
  <li>The web developer must keep track of more HTML documents</li>
  <li>It is difficult to print the entire page</li>
</ul>
<hr />

<h2>The Frameset Tag</h2>
<ul>
  <li>The &lt;frameset&gt; tag defines how to divide the window into frames</li>
  <li> Each frameset defines a set of rows <b> or</b> columns</li>
  <li>The values of the rows/columns indicate the amount of screen area each row/column will
    occupy</li>
</ul>
<hr />
<h2>The Frame Tag</h2>
<ul>
  <li>The &lt;frame&gt; tag defines what HTML document to put into each frame</li>
</ul>
<p>In the example below we have a frameset with two columns. The first column is
set to 25% of the width of the browser window. The second column is set to 75%
of the width of the browser window. The HTML document &quot;frame_a.htm&quot; is
put into the first column, and the HTML document &quot;frame_b.htm&quot; is put
into the second column:</p>
<table width="100%" class="ex" cellspacing="0" border="1">
    <tr>
      <td>
        <pre>&lt;frameset cols=&quot;25%,75%&quot;&gt;
&nbsp;&nbsp; &lt;frame src=&quot;frame_a.htm&quot;&gt;
&nbsp;&nbsp; &lt;frame src=&quot;frame_b.htm&quot;&gt;
&lt;/frameset&gt;</pre>
      </td>
    </tr>
</table>
<p><b>Note:</b> The frameset column size value can also be set in pixels 
(cols=&quot;200,500&quot;), and one of the columns can be set to use the remaining space 
(cols=&quot;25%,*&quot;).<br />
</p>
<hr />

<h2>Basic Notes - Useful Tips</h2>

<p>If a frame has visible borders, the user can resize it by dragging
the border. To prevent a user from doing this, you can add noresize=&quot;noresize&quot; to
the &lt;frame&gt; tag.</p>

<p>Add the &lt;noframes&gt; tag for browsers that do not
support frames.</p>
<p><b>Important:</b> You cannot use the &lt;body&gt;&lt;/body&gt; tags together with the 
&lt;frameset&gt;&lt;/frameset&gt; tags! However, if you add a &lt;noframes&gt; tag containing some 
text for browsers that do not support frames, you will have to enclose the text 
in &lt;body&gt;&lt;/body&gt; tags! See how it is done in the first example below.</p>

<hr />

<h2>More Examples</h2>

<p><a target="_blank" href="tryit.asp@filename=tryhtml_noframes">How to use the &lt;noframes&gt; tag</a><br />
This example demonstrates how to use the &lt;noframes&gt; tag.
</p>

<p>
<a target="_blank" href="tryit.asp@filename=tryhtml_frame_mix">Mixed frameset</a><br />
This example demonstrates how to make a frameset with three documents, and
how to mix them in rows and columns.
</p>

<p>
<a target="_blank" href="tryit.asp@filename=tryhtml_frame_noresize">Frameset with noresize=&quot;noresize&quot;</a><br />
This example demonstrates the noresize attribute. The frames are not resizable. 
Move the mouse over the borders between the frames and notice that you can not 
move the borders.</p>

<p>
<a target="_blank" href="tryit.asp@filename=tryhtml_frame_navigation">Navigation frame</a><br />
This example demonstrates how to make a navigation frame. The navigation frame contains a
list of links with the second frame as the target. The file called &quot;tryhtml_contents.htm&quot; 
contains three links. The source code of the links:<br />
&lt;a href =&quot;frame_a.htm&quot; target =&quot;showframe&quot;&gt;Frame a&lt;/a&gt;&lt;br&gt;<br />
&lt;a href =&quot;frame_b.htm&quot; target =&quot;showframe&quot;&gt;Frame b&lt;/a&gt;&lt;br&gt;<br />
&lt;a href =&quot;frame_c.htm&quot; target =&quot;showframe&quot;&gt;Frame c&lt;/a&gt;<br />
The second frame will show the linked document.</p>

<p>
<a target="_blank" href="tryit.asp@filename=tryhtml_iframe">Inline frame</a><br />
This example demonstrates how to create an inline frame (a frame inside an HTML
page).

</p>

<p><a target="_blank" href="tryit.asp@filename=tryhtml_frame_jump">Jump to a specified section
within a frame</a><br />
This example demonstrates two frames. One of the frames has a source to a
specified section in a file. The specified section is made with &lt;a
name=&quot;C10&quot;&gt; in the &quot;link.htm&quot; file.
</p>

<p><a target="_blank" href="tryit.asp@filename=tryhtml_frame_navigation2">Jump to a specified
section with frame navigation</a><br />
This example demonstrates two frames. The navigation frame (content.htm) to the left contains a
list of links with the second frame (link.htm) as a target. The second frame shows
the linked document. One of the links in the navigation frame is linked to a
specified section in the target file. The HTML code in the file &quot;content.htm&quot;
looks like this: &lt;a href ="link.htm" target ="showframe">Link without Anchor&lt;/a>&lt;br&gt;&lt;a href
=&quot;link.htm#C10&quot; target ="showframe">Link with Anchor&lt;/a>.
</p>

<hr />

<h2>Frame Tags</h2>

<table class="ex" cellspacing="0" border="1" width="100%">
<tr>
<th align="left">Tag</th>
<th align="left">Description</th>
</tr>
<tr>
<td><a href="../tags/tag_frameset.asp">&lt;frameset&gt;</a></td>
<td> Defines a set of frames</td>
</tr>
<tr>
<td><a href="../tags/tag_frame.asp">&lt;frame&gt;</a></td>
<td> Defines a sub window (a frame)</td>
</tr>
<tr>
<td><a href="../tags/tag_noframes.asp">&lt;noframes&gt;</a></td>
<td>Defines a noframe section for browsers that do not handle frames</td>
</tr>
<tr>
<td><a href="../tags/tag_iframe.asp">&lt;iframe&gt;</a></td>
<td>Defines an inline sub window (frame)</td>
</tr>
</table>
<br />
<hr />
<a href="html_links.asp"><img border="0" src="../images/btn_previous.gif" width="100" height="20" alt="Previous" /></a>
<a href="html_tables.asp"><img border="0" src="../images/btn_next.gif" width="100" height="20" alt="Next" /></a>

<p>From <b>http://www.w3schools.com</b> (Copyright Refsnes Data)</p>

</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -