请教了,iframe怎么讲,用的时候如何用,请简单示例.(online)

YiMeiEr 2003-12-11 02:45:31
最近总是看到各位讲一些iframe的问题,我不知道怎么用,也不知道这个的具体意思是什么,敢请各位讲解一下,谢谢 .
...全文
72 13 打赏 收藏 转发到动态 举报
写回复
用AI写文章
13 条回复
切换为时间正序
请发表友善的回复…
发表回复
零度空间0520 2010-06-18
  • 打赏
  • 举报
回复
进来学习了。。。
YiMeiEr 2003-12-11
  • 打赏
  • 举报
回复
谢谢各位了,
现在给分了,
loveme2000ok 2003-12-11
  • 打赏
  • 举报
回复
up
ghlfllz 2003-12-11
  • 打赏
  • 举报
回复
IFRAME 元素也就是文档中的文档,或者好像浮动的框架(FRAME)。frames 集合提供了对 IFRAME 内容的访问。请使用 frames 集合读写 IFRAME 内包含的元素。例如,如果要访问 iframe 内 body 对象的 backgroundColor 样式,语法应为:

sColor = document.frames("sFrameName").document.body.style.backgroundColor;

通过 iframe 对象所在页面的对象模型,你可以访问 iframe 对象的属性,但不能访问其内容。例如,访问 iframe 对象的 border 样式的语法应为:

sBorderValue = document.all.oFrame.style.border;

注意 iframe 的属性必须使用前缀 document.all 访问,例如 document.all.iframeId.marginWidth。
Internet Explorer 5.5 支持浮动框架的内容透明。如果想要为浮动框架定义透明内容,则必须满足下列条件。

与 IFRAME 元素一起使用的 ALLOWTRANSPARENCY 标签属性必须设置为 true。
在 IFRAME 内容源文档,background-color 或 BODY 元素的 BGCOLOR 标签属性必须设置为 transparent。
参看使用透明的浮动框架可以获得关于透明浮动框架更多的信息。

此元素在 Microsoft® Internet Explorer 4.0 的 HTML 和脚本中可用。

此元素是一个块元素。

此元素需要关闭标签。

示例

下面的例子使用了 IFRAME 元素创建了包含页面 sample.htm 的框架。

<IFRAME ID=IFrame1 FRAMEBORDER=0 SCROLLING=NO SRC="sample.htm"></IFRAME>

下面的例子返回了对 IFRAME 包含的文档的 all 集合的引用。

var collAll = document.frames("IFrame1").document.all

有关iframe的详细信息请上MSDN,网址如下:
http://msdn.microsoft.com/workshop/author/dhtml/reference/objects/iframe.asp
Primer2002cn 2003-12-11
  • 打赏
  • 举报
回复
:)
Description

Creates inline floating frames.

Remarks

This element is a block element.

The IFrame functions as a document within a document. Consequently, access to the IFrame object is provided through the frames collection. Use the frames collection to read or write to elements contained in an IFrame.

Properties

align, className, dataFld, dataSrc, document, frameBorder, frameSpacing, hspace, id, innerHTML, innerText, isTextEdit, lang, language, marginHeight, marginWidth, offsetHeight, offsetLeft, offsetParent, offsetTop, offsetWidth, outerHTML, outerText, parentElement, parentTextEdit, scrolling, sourceIndex, src, style, tagName, title, vspace

Methods

contains, getAttribute, insertAdjacentHTML, insertAdjacentText, removeAttribute, scrollIntoView, setAttribute

Collections

all, children

Example

The following code returns a reference to the all collection within the IFrame.


document.all.frames["MyIFrame"].document.all


YiMeiEr 2003-12-11
  • 打赏
  • 举报
回复
是呀,
我也知道这是一个框架,
但我想知道它更多的属性,
请各位找一个例子吧
flying310 2003-12-11
  • 打赏
  • 举报
回复
<iframe name="ad" frameborder="0" width="100%" height="24" scrolling="no" src="你的asp文件"></iframe>
可以在一页中嵌套另一页的内容.
CDPC 2003-12-11
  • 打赏
  • 举报
回复
UP一下,
哈哈
skyboy0720 2003-12-11
  • 打赏
  • 举报
回复
同意楼上,你看看聊天室,就用到了!
a_zhe_20 2003-12-11
  • 打赏
  • 举报
回复
呵呵,就是页中页
loveme2000ok 2003-12-11
  • 打赏
  • 举报
回复
我也想要一个,谢谢
Email:wzc-email@263.sina.com
Primer2002cn 2003-12-11
  • 打赏
  • 举报
回复
我这里有一个文档,对你挺有用,需要的话留下MAIL吧!
lqflsh 2003-12-11
  • 打赏
  • 举报
回复
就是框架。一个框架可以包含几个网页,比如左边是目录导航,右边是详细内容。

28,407

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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