简单的问题,解决给分

jiangjian0427 2004-09-15 03:44:32
在网上看到过网页中内嵌网页的
请问是怎么做的?
...全文
161 14 打赏 收藏 转发到动态 举报
写回复
用AI写文章
14 条回复
切换为时间正序
请发表友善的回复…
发表回复
jiangjian0427 2004-09-17
  • 打赏
  • 举报
回复
...
jiangjian0427 2004-09-16
  • 打赏
  • 举报
回复
找到了,给大家看看:
我试了试,可以:
2,有安全的问题
3:perfect!
========================================================


2.<object>方式

[代码] <object style="border:0px" type="text/x-scriptlet" data="import.htm" width=100% height=30></object>


3.Behavior的download方式

[代码]
<span id=showImport></span>
<IE:Download ID="oDownload" STYLE="behavior:url(#default#download)" />
<script>
function onDownloadDone(downDate){
showImport.innerHTML=downDate
}
oDownload.startDownload('import.htm',onDownloadDone)
</script>

tpf9000 2004-09-16
  • 打赏
  • 举报
回复
^_^厉害
dsclub 2004-09-16
  • 打赏
  • 举报
回复
嗯, ddcatlee(豆豆猫) 说得比较齐全了
caojinrong 2004-09-16
  • 打赏
  • 举报
回复
楼上猛。
2003bbs 2004-09-16
  • 打赏
  • 举报
回复
大家还是没有说明论坛中怎样实现的啊。
ddcatlee 2004-09-15
  • 打赏
  • 举报
回复
<OBJECT data="要包含的页面的连接.html" type="text/html">
这里是不支持object的浏览器看到的信息。
</OBJECT>

这个就如同你在页面里插入flash或者视频等,用到了object控件,如果浏览器不支持的话,就看不到。

---------------------------------------------------------------

<!-- include file="your path" -->

用include方法,文件必须为.shtml或asp文件在IIS解析后才可以


---------------------------------------------------------------

使用脚本文件技术

---- 我们知道document.write方法可以在宿主页面中输出内容,这样就可以通过在宿主页面中引入外部脚本文件来达到嵌入外部页面的目的。方法是在宿主页面中包含外部页面的位置插入“< SCRIPT language="javascript" src="import.js" >< /SCRIPT >”,然后对外部页面进行改造,将每一行内容写入document.write中,并另外保存在扩展名为js的新文件中。

---- 这种方法的特点是外部页面不具有自己的方形区域,和宿主页面浑然一体,但由于外部页面内容全部写在脚本中,无法做到所见即所得,必须等到脚本运行时才能看到实际效果,这样就为修改调试增加了困难。
jiangjian0427 2004-09-15
  • 打赏
  • 举报
回复
Pardon my language, but that's the exact phrase many people use when asked of this question. Allow me to explain. SSI stands for Server Side Includes, and are HTML commands that work like macros. Uh? In English, it means the use of the server to dynamically include something into a document. SSI is server-dependent, and is supported even by NS 2 (in other words, virtually all browsers on the net).

SSI works like this- You include inside your document a code fragment that looks something like this:

<!--#include file="afile.htm" -->

Servers that support SSI will not merely read the above as a HTML comment, but as a command that informs the server to insert "afile.htm" at that location of the document. The biggest difference in terms of syntax between a SSI code and a HTML comment is that SSI codes have a hash # following the tag opener.

Your server must support SSI in order to be able to take advantage of SSI commands. So how do you know if your server supports SSI? Well, first of all, most "free" web hosts, such as Geocities, Tripod, etc, do NOT support SSI...a rare exception is Hypermart. If your site's on a paid server, then this information should have been made available to you when you first signed on. If not, just send an email to your system administrator. Secondly, even if your server does support SSI, it's important to realize that most of them requires that you rename any HTML document that contains SSI from .html or .htm to .shtml. By doing so, the server knows that it should scan for and interpret SSI commands (instead of simply treating them as another HTML comment). Ok, now we're ready to officially see how to use SSI to dynamically embed a document inside another.
jiangjian0427 2004-09-15
  • 打赏
  • 举报
回复
The "include" format

All include directives are formatted as SGML comments within your document. This is in case the document should ever be transferred without being parsed.

Each directive has the following format:

<!--#command tag1="value1" tag2="value2" -->

Each command takes different arguments, most only accept one tag at a time. Here is a breakdown of the commands and their associated tags:

include
config
other commands

include

Inserts the text of a specified document into the body of the current document. Is commonly used for including headers or footers in web pages.

<!--#include virtual="/dir/file.ext"-->
<!--#include file="subdir/file.ext"-->

Notes:
Do not leave any spaces between the equal ("=") sign and the file it specifies. Doing so will cause an error message to be displayed.
Any included file is subject to the usual access authorization controls.
If you use a domain name you must use the virtual command. file only works with WebCom URLs.


virtual
gives a virtual path to a document on the server. A normal file or another parsed document may be accessed using this tag. Please note that the path of this file name should be the URL of the file, with the domain name removed, and the userid added. For instance, if the URL of a file is "http://www.your-domain.com/products/footer.txt" and your userid is "userid" then the path to use with this include directive would be: "/userid/products/footer.txt"
Example: <!--#include virtual="/virtual_sample.txt"-->

This is a sample text file. It was included in this file by the include virtual tag:
<!--#include virtual="/webcom/virtual_sample.txt"-->.

This paragraph includes a hotlink, and tags such as bold and emphasis.

file
gives a pathname relative to the current directory. ../ cannot be used in this pathname, nor can absolute paths be used. (If you need to refer to a file in a higher directory, you might consider using virtual described above.) As above, you can send other parsed documents.
Example: <!--#include file="sample.txt"-->

This is a sample text file. It was included in this file by the include file tag: <!--#include file="sample.txt"-->.

This paragraph includes a hotlink, and tags such as bold and emphasis.
jiangjian0427 2004-09-15
  • 打赏
  • 举报
回复
找到一些资料,自己看不懂,晕,大家教我:

Including HTML in another HTML document
Sometimes, rather than linking to another document, it is helpful to include
the contents of an HTML document in another HTML document. We recommend
using the OBJECT element
with the data attribute
for this purpose.
For instance, the following line will include the
contents of piece_to_include.html at the location where the OBJECT
definition occurs.
...text before...
<OBJECT data="file_to_include.html">
Warning: file_to_include.html could not be included.
</OBJECT>
...text after...
The contents of OBJECT
must only be rendered if the file specified by the data
attribute cannot be loaded.
The behavior of a user agent in cases where a file includes itself is not
defined.
Careful file inclusions. Be careful if you
attempt to include a section of an HTML document defined by an anchor.
The entire document after the anchor definition will be included, and you
might unwittingly include unwanted end tags (for elements such as BODY,
HTML, etc.) in your document.
The IFRAME element
may also be used to insert an inline frame containing text in an HTML document.
haor 2004-09-15
  • 打赏
  • 举报
回复
有这样的贴子吗?URL?
wuyuhua_2000 2004-09-15
  • 打赏
  • 举报
回复
有的论坛可以发html文件啊
jiangjian0427 2004-09-15
  • 打赏
  • 举报
回复
对不起,忘记说了,不用frame
在论坛看到的,有个人发个帖,就直接发了一个其他地方的网页过来了
他的贴子是显示在中间的
haor 2004-09-15
  • 打赏
  • 举报
回复
<iframe src="xx.htm"/>

61,112

社区成员

发帖
与我相关
我的任务
社区描述
层叠样式表(英文全称:Cascading Style Sheets)是一种用来表现HTML(标准通用标记语言的一个应用)或XML(标准通用标记语言的一个子集)等文件样式的计算机语言。
社区管理员
  • HTML(CSS)社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧