主题:  恳求相助!

沉默是金

职务:普通成员
等级:6
金币:11.2
发贴:4357
注册:2004/2/18 11:17:25
#12002/4/2 9:12:48
我研究DW已经有很长的一段时间了,现在遇到一个不太理解的问题,恳求大虾的帮助:
iframe和frame有什么区别,iframe是什么意思,哪位有这方面的教程还请告之在下,感激不尽。


难人一个……

5D荣誉斑竹

职务:普通成员
等级:5
金币:10.0
发贴:3292
注册:2001/5/24 10:01:29
#22002/4/2 10:05:02
iframe是内框架
frame是框架



沉默是金

职务:普通成员
等级:6
金币:11.2
发贴:4357
注册:2004/2/18 11:17:25
#32002/4/2 14:21:03
有没有这方面的教程呀?


难人一个……

5DDreamweaver版主

职务:版主
等级:3
金币:10.0
发贴:1031
注册:2001/10/13 14:38:50
#42002/4/3 2:10:34
E文的,不过很有用

IFRAME> NN n/a IE 3 HTML 4

End Tag: Required

An IFRAME element creates an inline frame within the natural flow of a document's content. The frame is a rectangular space into which you may load any other HTML document (or use scripts to dynamically write content to the space). If you assign a value to the NAME attribute of an IFRAME element, you may supply that name as the value of a TARGET attribute of A, FORM, or other element that lets you define a target for a destination or returned document.

Although an IFRAME element's rectangular space begins immediately following the content that comes before it (including in a line of text), all content following the end tag starts on the next line following the frame rectangle. Text leading up to the IFRAME element can be aligned in the same ways that text can be aligned around an IMG or OBJECT element.

Content between the start and end tags is ignored by browsers that support the IFRAME element. All others display such content as inline HTML content (as a way to let users know what they're missing and perhaps provide a link to related information). The Navigator 4 element that comes closest to the functionality and behavior of the IFRAME element is the ILAYER element.


Example



Object Model Reference IE [window.]document.frameName


ALIGN NN n/a IE 3 HTML 4

ALIGN="alignmentConstant" Optional

Determines how the rectangle of the IFRAME element aligns within the context of surrounding content.


Example



value
Case-insensitive constant value.

Default bottom


Object Model Reference IE [window.]document.frameName.align


BORDER NN n/a IE 4 HTML n/a

BORDER="pixelCount" Optional

Theory and practice of IFRAME element borders in Internet Explorer 4 diverge a lot, especially when trying to match behaviors across operating systems. IE 4 for the Macintosh displays IFRAME elements with a 3-D effect around the border that is always visible, no matter what border attribute settings are assigned. For the Windows 95 version, the 3-D effect goes away when you turn off the FRAMEBORDER attribute. As for the BORDER attribute, the size of the border acts as a margin setting in IE 4/Mac, but only for the top and left edges of the frame space: content is displaced to the right and down by the border size, causing the content to flow over the right and bottom edges--quite a mess. The BORDER attribute setting appears to have no effect in Windows 95. In no case does the border around an IFRAME look like a FRAME element border in IE 4.

That the HTML 4.0 specification does not include a BORDER attribute might lead one to believe it prefers the use of style sheet borders, instead of borders tied only to frames. If you want a genuine border around an IFRAME element in IE 4, use a style sheet border instead. Its behavior is far more consistent and predictable (and is thoroughly unrelated to nonfunctioning style sheet borders for frames defined by a FRAMESET).


Example



value
A positive integer value.

Default 0


Object Model Reference IE [window.]document.frameName.border


BORDERCOLOR NN n/a IE 4 HTML n/a

BORDERCOLOR="colorTripletOrName" Optional

The BORDERCOLOR attribute should assign a color to whatever border surrounds an IFRAME element. In practice, because borders controlled by attributes do not appear in the Windows 95 version of Internet Explorer 4, no color appears either. On the Macintosh side, an assigned color may appear on two adjacent edges of an IFRAME element, but the look is unpredictable. Use style sheet rules to assign borders and border colors to IFRAME elements.


Example



value
A hexadecimal triplet or plain-language color name.

Default None.


Object Model Reference IE [window.]document.frameName.borderColor


DATAFLD NN n/a IE 4 HTML n/a

DATAFLD="columnName" Optional

Used with IE 4 data binding to associate a remote data source column name in lieu of an SRC attribute for an IFRAME element. The data source column must contain a valid URI (relative or absolute). A DATASRC attribute must also be set for the element.


Example



value
Case-sensitive identifier.

Default None.


Object Model Reference IE [window.]document.frameName.dataFld


DATASRC NN n/a IE 4 HTML n/a

DATASRC="dataSourceName" Optional

Used with IE 4 data binding to specify the name of the remote ODBC data source (such as an Oracle or SQL Server database) to be associated with the element. Content from the data source is specified via the DATAFLD attribute.


Example



value
Case-sensitive identifier.

Default None.


Object Model Reference IE [window.]document.frameName.dataSrc


FRAMEBORDER NN n/a IE 3 HTML 4

FRAMEBORDER="borderSwitch" Optional

Controls whether an individual frame within a frameset displays a border. Setting IFRAME element borders via the element's attributes is chancy at best in Internet Explorer 4. Use style sheet borders instead.


Example



value
On-off values for this attribute vary with the source. HTML 4.0 specifies the values of 1 (on) and 0 (off). Navigator uses yes and no. Internet Explorer 4 accepts the HTML values and yes or no.

Default 1


Object Model Reference IE [window.]document.frameName.frameBorder


FRAMESPACING NN n/a IE 4 HTML n/a

FRAMESPACING="pixelLength" Optional

Controls the thickness of space between multiple, adjacent IFRAME elements. In practice, the attribute has no effect in Internet Explorer 4. Use style sheet border attributes to create borders around IFRAME elements.


value
A positive integer.

Default 0


Object Model Reference IE [window.]document.frameName.frameSpacing


HEIGHT, WIDTH NN n/a IE 4 HTML n/a

HEIGHT="length" WIDTH="length" Optional

Microsoft HTML documentation for IE 4 says that the HEIGHT and WIDTH attributes control the size of a IFRAME element. The attributes are recognized in IE 4 for Windows, but not for the Macintosh. Moreover, these attributes are not recognized as scriptable properties--often a sign that the attributes are not genuinely supported. Use these attributes at your own risk. Instead, you can rely on style sheet positioning (using relative positioning) to set the height and width of the element in all operating system platforms.


Example



value
Any valid URI, including complete and relative URLs.

Default None.


MARGINHEIGHT, MARGINWIDTH NN n/a IE 3 HTML 4

MARGINHEIGHT="pixelCount" MARGINWIDTH="pixelCount" Optional

Determine the number of pixels between the inner edge of a frame and the content rendered inside the frame. The MARGINHEIGHT attribute controls space along the top and (when scrolled) the bottom edges of a frame; the MARGINWIDTH attribute controls space on the left and right edges of a frame. The HTML 4.0 specification leaves default behavior up to browsers.

Without any prompting, Internet Explorer 4 automatically inserts a margin of 14 (Windows) or 8 (Macintosh) pixels inside a frame. But if you attempt to override the default behavior, be aware that setting any one of these two attributes causes the value of the other to go to zero. Therefore, unless you want the content to be absolutely flush with various frame edges, you need to assign values to both attributes. Due to the disparity in default values for each operating system, you cannot assign truly default values to these attributes.


Example



value
Any positive integer value or zero.

Default 14 (Windows) or 8 (Macintosh).


Object Model Reference IE [window.]document.frameName.marginHeight
[window.]document.frameName.marginWidth


NAME NN n/a IE 3 HTML 4

NAME="elementIdentifier" Optional

When links and forms must load their destination or returned documents into frames other than the one holding the link or form, those elements have TARGET attributes indicating which frame receives the new content. To direct such content to a frame, the frame must have a value assigned to its NAME attribute. That same value is assigned to the TARGET attribute of the A or FORM element. Client-side scripting also uses the frame's name in building references to other frames or content in other frames. It is good practice to assign a unique identifying name to all frames.


Example



value
Case-sensitive identifier.

Default None.


Object Model Reference IE [window.]document.frameName.name


NORESIZE NN n/a IE 4 HTML n/a

NORESIZE Optional

It's curious why the NORESIZE attribute is included in Internet Explorer for the IFRAME element. Regardless of the setting, an IFRAME element cannot be manually resized by the user.


Example



value
The presence of the attribute makes the frame nonresizable (although so does its absence).

Default An IFRAME element is supposed to be resizable by default, but in practice it is not.


Object Model Reference IE [window.]document.frameName.noResize


SCROLLING NN n/a IE 3 HTML 4

SCROLLING=auto | no | yes Optional

By default, browsers add vertical and/or horizontal scrollbars when the content loaded into an inline frame exceeds the visible content region of the element. Scrollbars can affect the layout of some content because they occupy space normally devoted to content (that is, the frame does not expand to accommodate scrollbars). Also, due to differences in default font sizes in browsers and operating system versions, a given collection of text content may display differently in different clients. If you want to prevent scrollbars from appearing in the frame, set the SCROLLING attribute to no; if you want scrollbars to be in the frame at all times, set the attribute to yes. In the latter case, if the content does not require scrolling, the scrollbars are visible, but disabled.

Setting the SCROLLING attribute to no should be used only after you have tested on all browsers and platforms that mission-critical content is always visible in the frame. If the frame is set to not scroll, some users might not be able to see all content of the frame.


Example



value
Case-insensitive constant values (optionally quoted): auto | no | yes.

Default auto


Object Model Reference IE [window.]document.frameName.scrolling


SRC NN n/a IE 3 HTML 4

SRC="URL" Optional

Defines the URL of the content to be loaded into the IFRAME element. The URL can be an absolute URL or one relative to the URL of the document containing the frameset specifications. You may also use the javascript: pseudo-URL to have the returned value of a script appear in the frame. If you omit the SRC attribute, the frame opens empty.


Example



value
A complete or relative URL or a javascript: pseudo-URL.

Default None.


Object Model Reference IE [window.]document.frameName.src


STYLE NN n/a IE 4 HTML 4

STYLE="styleSheetProperties" Optional

This attribute lets you set one or more style sheet rule property assignments for the current element. Styles affect the inline frame and not its content. Therefore, a border assigned to an IFRAME element style appears around the frame, not inside the frame.


Example



value
An entire CSS-syntax style sheet rule is enclosed in quotes. Multiple style attribute settings are separated by semicolons. Style sheet attributes are detailed in .

Default None.


Object Model Reference IE [window.]document.frameName.style

编辑历史:[这消息被qqkk2000编辑过(编辑时间2002-04-03 02:21:35)]


Juven

职务:普通成员
等级:2
金币:1.0
发贴:474
注册:2002/2/27 15:43:49
#52002/4/5 8:54:36
对于iframe,我网站曾经有篇文章:巧用 Dreamweaver 的表格功能