📄 怎么在html中include一个文件内容.htm
字号:
<CENTER></CENTER></TD>
<TD class=p2 width=102></TD></TR></TBODY></TABLE>
<TABLE border=0 cellPadding=0 cellSpacing=0 width=755>
<TBODY>
<TR>
<TD height=1></TD></TR>
<TR bgColor=#ffcc00>
<TD align=right height=23 width=355>
<CENTER></CENTER>
<P align=center>中国动感资源交流,网络动感资源荟萃</P></TD>
<TD align=middle>
<P align=center><A href="http://www.moonet.com/edu/">教育网</A>
英文版</P></TD></TR></TBODY></TABLE>
<CENTER>
<TABLE border=0 cellPadding=0 cellSpacing=0 width=755>
<TBODY>
<TR vAlign=top>
<TD bgColor=#297dff width=1> </TD>
<TD width=753></TD>
<TD bgColor=#297dff width=1> </TD></TR></TBODY></TABLE>
<TABLE border=0 cellPadding=0 cellSpacing=0 width=755>
<TBODY>
<TR vAlign=top>
<TD bgColor=#297dff width=1> </TD>
<TD width=753>
<TABLE border=0 cellPadding=0 cellSpacing=0 width="100%">
<TBODY>
<TR>
<TD bgColor=#297dff colSpan=2 height=20><FONT color=#ceffff> →
<A href="http://www.aspsky.net/article/index.asp?classid=2"><FONT
color=#ceffff>ASP技术</FONT></A> >> <A
href="http://www.aspsky.net/article/index.asp?classid=2&Nclassid=30"><FONT
color=#ceffff>脚本编码</FONT></A> >>
《怎么在html中include一个文件内容》</FONT></TD></TR>
<TR>
<TD bgColor=#586011 colSpan=2 height=1><SPACER type="block"
width="1"></TD></TR>
<TR>
<TD colSpan=2 height=7></TD></TR>
<TR>
<TD align=middle class=p4
colSpan=2><B>怎么在html中include一个文件内容</B></FONT><BR>2001-6-7 动网先锋
</TD></TR>
<TR>
<TD class=p4 colSpan=2>
<BLOCKQUOTE><BR>在html文件引入其它html文件的几种方法<BR>简介:在论坛中常常有网友问到,可以在一个html的文件当中读取另一个html文件的内容吗?答案是确定的,而且方法不只一种,在以前我只会使用iframe来引用,后来发现了另外的几种方法,那今天就总结这几种方法让大家参考一下,本人觉得第三种方式较好!
<BR>1.IFrame引入,看看下面的代码
<P></P>
<P>[代码] <IFRAME NAME="content_frame" width=100% height=30
marginwidth=0 marginheight=0 SRC="import.htm" ></IFRAME>
</P>
<P></P>
<P>你会看到一个外部引入的文件,但会发现有一个类似外框的东西将其包围,可使用<BR>[代码] <iframe
name="content_frame" marginwidth=0 marginheight=0 width=100%
height=30 src="import.htm" frameborder=0></iframe> </P>
<P><BR>但你会发现还会有点问题,就是背景色不同,你只要在引入的文件import.htm中使用相同的背景色也可以,但如果你使用的是IE5.5的话,可以看看这篇关于透明色的文章
如果想引入的文件过长时不出现滚动条的话在import.htm中的body中加入scroll=no </P>
<P><BR>2.<object>方式</P>
<P>[代码] <object style="border:0px" type="text/x-scriptlet"
data="import.htm" width=100% height=30></object></P>
<P><BR>3.Behavior的download方式</P>
<P>[代码]<BR><span
id=showImport></span><BR><IE:Download ID="oDownload"
STYLE="behavior:url(#default#download)" /><BR><script>
<BR>function
onDownloadDone(downDate){<BR>showImport.innerHTML=downDate<BR>}
<BR>oDownload.startDownload('import.htm',onDownloadDone)<BR></script></P>
<P><BR><BR></P></BLOCKQUOTE></TD></TR>
<TR>
<TD class=p4 vAlign=top width="50%">
<BLOCKQUOTE>原作者:chenyangasp<BR>来
源:Chinaasp论坛<BR>共有2678位读者阅读过此文<BR>【<A
href="http://bbs.aspsky.net/list.asp?boardid=1">发表评论</A>】
</BLOCKQUOTE></TD>
<TD class=p4 vAlign=top width="50%">
<P>
<LI><FONT color=#0772b1>上篇文章</FONT>:<A
href="http://www.aspsky.net/article/list.asp?id=2059">全面剖析VB.NET(7)</A>
<BR>
<LI><FONT color=#0772b1>下篇文章</FONT>:<A
href="http://www.aspsky.net/article/list.asp?id=2061">介绍两种调试程序的方法</A>
</LI></TD></TR>
<TR>
<TD bgColor=#297dff class=p4 height=20 width="50%"><FONT
color=#ceffff> → 本周热门</FONT></TD>
<TD bgColor=#297dff class=p4 width="50%"><FONT color=#ceffff> →
相关文章</FONT></TD></TR>
<TR>
<TD bgColor=#586011 colSpan=2 height=1><SPACER type="block"
width="1"></TD></TR>
<TR>
<TD colSpan=2 height=7></TD></TR>
<TR>
<TD class=p4 vAlign=top width="50%">
<LI><A href="http://www.aspsky.net/article/list.asp?id=1510"
target=_top title="SQL Server 7.0 入门(一)">SQL Server 7.0
入门(...</A>[<FONT color=red>7239</FONT>]<BR>
<LI><A href="http://www.aspsky.net/article/list.asp?id=1540"
target=_top title=PHP4实际应用经验篇(1)>PHP4实际应用经验篇(1)</A>[<FONT
color=red>7135</FONT>]<BR>
<LI><A href="http://www.aspsky.net/article/list.asp?id=1536"
target=_top
title=无组件文件上传代码实例(支持多文件上传及文件和input域混合上传)>无组件文件上传代码实例(支持多文件上...</A>[<FONT
color=red>6029</FONT>]<BR>
<LI><A href="http://www.aspsky.net/article/list.asp?id=2557"
target=_top title=树型结构在ASP中的简单解决>树型结构在ASP中的简单解决</A>[<FONT
color=red>5757</FONT>]<BR>
<LI><A href="http://www.aspsky.net/article/list.asp?id=1545"
target=_top title=PHP4实际应用经验篇(6)>PHP4实际应用经验篇(6)</A>[<FONT
color=red>5599</FONT>]<BR>
<LI><A href="http://www.aspsky.net/article/list.asp?id=2563"
target=_top title=一个老个写的无组件上传>一个老个写的无组件上传</A>[<FONT
color=red>5014</FONT>]<BR>
<LI><A href="http://www.aspsky.net/article/list.asp?id=1542"
target=_top title=PHP4实际应用经验篇(3)>PHP4实际应用经验篇(3)</A>[<FONT
color=red>4731</FONT>]<BR></LI></TD>
<TD class=p4 vAlign=top width="50%">
<LI><A
href="http://www.aspsky.net/article/list.asp?id=2357">asp.NET中使用include</A><BR>
<LI><A
href="http://www.aspsky.net/article/list.asp?id=2060">怎么在html中include一个文件内容</A><BR>
<LI><A
href="http://www.aspsky.net/article/list.asp?id=1989">#include file
和 #include virtual的区别(菜鸟篇)</A><BR>
<LI><A
href="http://www.aspsky.net/article/list.asp?id=1878">动态Include文件的讨论</A><BR>
<LI><A
href="http://www.aspsky.net/article/list.asp?id=1580">一种比使用include
adovbs.inc更好的方法</A><BR></LI></TD></TR>
<TR>
<TD colSpan=2 height=7></TD></TR></TBODY></TABLE>
<TD bgColor=#297dff width=1> </TD></TR></TBODY></TABLE>
<TABLE border=0 cellPadding=0 cellSpacing=0 width=755>
<TBODY>
<TR>
<TD bgColor=#297dff height=1><SPACER type="block"
width="1"></TD></TR></TBODY></TABLE>
<TABLE border=0 cellPadding=0 cellSpacing=0 width=755>
<TBODY>
<TR>
<TD align=middle height=30></TD></TR></TBODY></TABLE>
<TABLE border=0 cellPadding=0 cellSpacing=0 width=755>
<TBODY>
<TR>
<TD align=middle class=p2 width="100%">
<TABLE border=0 cellPadding=0 cellSpacing=0 width=755>
<TBODY>
<TR>
<TD align=middle class=p2 width="100%">
<P align=center><A
href="http://www.aspsky.net/produce/index.asp">客户服务</A> -- <A
href="http://www.aspsky.net/aspads.asp">广告合作</A> -- <A
href="http://www.aspsky.net/about.asp">关于本站</A> -- <A
href="http://www.aspsky.net/tell.asp">联系方法</A><BR><BR>动网先锋版权所有 <FONT
face=Verdana, size=1 Arial, Helvetica, sans-serif>Copyright ©
2000-2001 <B>AspSky<FONT color=#cc0000>.Net</FONT></B>, All Rights
Reserved .</FONT>
</P></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></CENTER></CENTER></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -