An iframe's attribute reference manual

Source: Internet
Author: User
Tags filter object end expression object model string visibility access
Reference | Reference manual IFRAME Elements | IFrame Object

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

Create an inline floating frame.

Member table

The following table lists the members that the IFrame object leads to. Click the tab on the left to select the type of member you want to view.

Label Properties/Properties

Show:
Label Properties/Properties
Behavior
Collection
Event
Filter
Method
Object
Style
Label Attribute Property Description
ALIGN ALIGN Sets or gets the table arrangement.
Allowtransparency allowtransparency Sets or gets whether the object can be transparent.
Application application Indicates whether the object's content is an HTML application (HTA) in order to exempt browser security mode.
ATOMICSELECTION Specifies whether elements and their contents can be selected uniformly in an invisible unit.
The begin begin sets or gets the delay time before the timeline plays on the element.
BORDER BORDER Sets or gets the space between frames, including a 3D border.
Canhavechildren gets a value that indicates whether the object can contain child objects.
Canhavehtml gets a value that indicates whether an object can contain rich HTML tags.
Class ClassName Sets or gets the classes of the object.
Contentwindow Gets the window object for the specified frame or IFRAME.
DATAFLD datafld Sets or gets the field specified by the Datasrc property that binds to the given data source of the specified object.
DATASRC DATASRC Sets or gets the data source used for data binding.
Disabled Gets a value that indicates whether the user can interact with the object.
End ends Sets or gets the value that indicates the ending time of the element, or the element is set to a simple continuous stop time that is repeated.
FirstChild gets a reference to the first child object of the ChildNodes collection of the object.
Frameborder frameborder Sets or gets whether the frame's borders are displayed.
Hasmedia gets a Boolean value that indicates whether the element is a html+time media element.
Height height Sets or gets the height of the object.
Hidefocus Hidefocus Sets or gets a value indicating whether the object explicitly indicates the focus.
Hspace hspace Sets or gets the horizontal margins of an object.
ID ID Gets the string that identifies the object.
InnerText Sets or gets the text that is inside the start and end tags of an object.
Iscontenteditable gets a value that indicates whether the user can edit the content of the object.
Isdisabled gets a value that indicates whether the user can interact with the object.
Ismultiline gets a value that indicates whether the object's contents are one row or multiple rows.
isTextEdit gets whether this object can be used to create a TextRange object.
Lang Lang Sets or gets the language to use.
LANGUAGE LANGUAGE Sets or gets the language in which the current script is written.
LastChild gets a reference to the last child object in the ChildNodes collection of this object.
LongDesc Sets or gets the Uniform Resource Identifier (URI) for the long description of the object.
Marginheight marginheight Sets or gets the height of the top and bottom margins before text in the frame is displayed.
Marginwidth marginwidth Sets or gets the width of the left and right margins before the text in the frame is displayed.
Name name to set or get the names of the frames.
NextSibling gets a reference to the next sibling object for this object.
NodeName gets the name of a particular node type.
NodeType get the type of node you want.
NodeValue Sets or gets the value of the node.
Offsetheight Gets the height of the object relative to the layout or the parent coordinates specified by the parent coordinate offsetparent property.
Offsetleft gets the left position of the calculation of the object relative to the layout or the parent coordinates specified by the Offsetparent property.
Offsetparent gets a reference to the container object that defines the offsettop and Offsetleft properties of the object.
Offsettop gets the calculated top position of the object relative to the layout or the parent coordinates specified by the offsettop property.
Offsetwidth Gets the width of the object relative to the layout or the parent coordinates specified by the parent coordinate offsetparent property.
Onoffbehavior gets an object that indicates whether the specified microsoft®directanimation® behavior is running.
outerHTML Sets or gets the HTML form of the object and its contents.
Outertext Sets or gets the text of an object.
Ownerdocument Sets or gets the document object associated with the node.
Parentelement gets the parent object in the object hierarchy.
ParentNode gets the parent object in the document hierarchy.
parentTextEdit Gets the container object in the document hierarchy that can be used to create the TextRange containing the original object.
PreviousSibling gets a reference to the previous sibling object for this object.
ReadyState gets the current state of the object.
ReadyState Gets the value that indicates the current state of the object.
RecordNumber gets the original record of the object being generated in the dataset.
ScopeName gets the namespace defined for the element.
Scrolling scrolling Sets or gets whether the frame can be scrolled.
The security security Gets a value that indicates whether the source file for a frame or IFRAME has a specific safety limit applied to it.
Sourceindex gets the order in which the object is located in the source order, that is, the object appearing in the all collection of document.
src src Sets or gets the URL to be loaded by the object.
Style sets the inline style for the setting element.
SyncMaster SyncMaster Sets or gets whether the time container must be replayed on this element.
Systembitrate gets the bps of approximately the available bandwidth in the system.
Systemcaption indicates whether you want to display text instead of the audio portion of the demo.
Systemlanguage indicates whether the given language is selected in the option settings on the user's computer.
SYSTEMOVERDUBORSUBTITLE Specifies whether to render dubbing or subtitles for users who are viewing the demo but are unfamiliar with the language used for the audio being played.
TABINDEX TABINDEX Sets or gets the index that defines the Tab order of the object.
TagName gets the label name of the object.
Tagurn Sets or gets the Uniform Resource name (URN) specified in the namespace declaration.
Timecontainer Timecontainer Sets or gets the type of time line associated with an element.
Title title set or get the object's consulting information (tooltips).
UniqueID gets the unique identifier that is automatically generated for the object.
unselectable specifies that the element cannot be selected.
Vspace vspace Sets or gets the vertical margin of an object.
Width width Sets or gets the breadth of the object.




Label Properties/Properties

Behavior

Behavioral description
Clientcaps provides information about the features supported by Internet Explorer, as well as the provision of out-of-the-way and install.
Download downloads the file and notifies a specified callback function after the download is complete.
Homepage contains information about the user's home page.
Time provides an active timeline for HTML elements.
TIME2 provides an active timeline for HTML elements or a set of elements.

Collection

Collection description
All returns a reference to the collection of elements contained by the object.
Attributes gets a collection of object label properties.
Behaviorurns returns a collection that identifies the Uniform Resource name (URN) string attached to the behavior of the element.
ChildNodes gets a collection of HTML elements and Textnode objects that are direct descendants of the specified object.
Children gets a collection of DHTML objects that are direct descendants of an object.

Event

Event description
OnActivate is triggered when an object is set to an active element.
Onafterupdate is triggered on a data-bound object when the associated object in the data source object is successfully updated.
Onbeforedeactivate fires immediately before activeelement changes from the current object to other objects in the parent document.
Onbeforeupdate is triggered on a data-bound object before the associated object in the data source object is successfully updated.
Onblur is triggered when an object loses input focus.
Oncontrolselect is triggered when the user is about to make a control selection for the object.
OnDeactivate is triggered when the activeelement changes from the current object to another object in the parent document.
Onerrorupdate is triggered on a data-bound object when an error occurs updating the associated data in the data source object.
Onfocus is triggered when the object gets focus.
OnLoad fires immediately after the browser finishes loading the object.
OnMove triggers when an object is moved.
Onmoveend is triggered when the object stops moving.
Onmovestart is triggered when the object begins to move.
onReadyStateChange is triggered when an object's state changes.
Onresizeend is triggered when the user changes the size of the object in the selection area of the control.
Onresizestart is triggered when the user starts to change the size of the object in the control's check area.
Ontimeerror is triggered unconditionally when a particular time error occurs, which is usually caused by setting the property to an invalid value.

Filter

Filter Property Description
Alpha adjusts the opacity of the object's contents.
AlphaImageLoader displays an image between the object's bounds and the object's background to the content, optionally trimming or scaling the image size. Transparency from 0到100% is supported when Portable network images (PNG) are mounted.
Barn displays the object's new content in the form of a door or closed motion.
Basicimage adjusts the color processing, image rotation, or opacity of the object's contents.
Blendtrans displays the object's new content in the form of an implicit original content.
Blinds Displays the object's new content by opening or closing the blind Spot's motion.
Blur the contents of the fuzzy object so that it appears to lose focus.
Checkerboard Displays the object's new content in the form of a chessboard covering the original content.
Chroma displays the specified color of the object's contents as transparent.
Compositor Displays the new contents of the object in the form of a new, old content logical color combination. The color and alpha values of each version are computed to determine the final color of the output image.
DropShadow creates an entity shadow of the object's contents, with the offset in the specified direction. This makes the content appear to be floating and therefore creates a shadow.
Emboss displays the objects in an embossed texture using grayscale values.
Engrave uses grayscale values to display objects in a carved texture.
Fade displays the object's new content in the form of an implicit original content.
FLIPH Displays the contents of the object in a horizontal flip direction.
FLIPV Displays the contents of the object in the form of a flip in the vertical direction.
Glow adds a halo outside the edge of the object to make it look like it's glowing.
Gradient shows the surface of a gradient color between the object's background and content.
Gradientwipe Displays the new contents of the object in the form of overwriting the gradient band on the original content.
Gray displays object content in grayscale.
Icmfilter converts the color content of an object based on the Image Color Management (ICM) configuration file. This allows you to improve the display of the specified content, or to simulate the display on hardware devices such as a printer or monitor.
Inset displays the new contents of the object in a diagonal direction.
Invert reverses the hue, saturation, and brightness of the object's content.
IRIS displays the object's new content in a rainbow effect, which is similar to the camera aperture opening.
Light creates a lighting effect on the contents of an object.
Maskfilter displays transparent pixels of the object's contents as a color mask, displaying non-transparent pixels as transparent.
Matrices use matrix transformations to scale, rotate, or visualize the contents of an object.
Motionblur Displays object content with a motion blur effect.
Pixelate Displays the contents of the object as a color box, depending on the average color value of the area that the square replaces. This filter appears to be available for switching.
Radialwipe the new contents of the object in the form of a radiant erasure.
Randombars shows the new content of the object in the form of random pixel line explosion.
Randomdissolve the new contents of the object in the form of random pixel explosion.
Redirect is not yet supported.
Revealtrans uses 24 predefined toggle effects to show the object's new content.
Shadow creates an entity shadow of the object's contents, with the offset in the specified direction. This creates a shadow effect.
Slide the new contents of the object in the form of an image glide.
Spiral the new contents of the object in the form of spiral motion.
Stretch the new content of the object in the form of a stretch covering the original content. There is an option similar to a cube turning from one surface to another surface.
Strips the original content of the object in a strip-covered form, as if a saw saw the original content.
Wave performs a vertical sine wave distortion on the object's contents.
Wheel the new contents of the object in the form of a rotational motion, as if the wheel were rolling over the original content.
Xray change the color depth of the object's content to show it in black and white.
Zigzag the object's new content on the object to overwrite the original content.

Method

Method description
Addbehavior attaches an action to the element.
AppendChild appends a child element to an object.
Applyelement makes an element a child element or parent element of another element.
Attachevent binds the specified function to an event so that it is called whenever the event fires on an object.
Blur causes the element to lose focus and triggers the onblur event.
Clearattributes removes all tag properties and values from the object.
CloneNode copies references to objects from the document hierarchy.
Componentfrompoint returns the position of the object at the specified coordinates through a specific event.
Contains checks whether the object contains a given element.
DetachEvent removes the binding of the specified function from the event so that the function is not notified when the event is triggered.
DragDrop initializes the drag event.
FireEvent the specified event that triggers the object.
Focus causes the element to be focused and executes the code specified by the onfocus event.
Getadjacenttext returns an adjacent text string.
GetAttribute gets the value of the specified label property.
GetAttributeNode Gets the attribute object that is referenced by the Attribute.name property.
getElementsByTagName gets a collection of objects based on the specified element name.
GetExpression gets the expression for the given property.
HasChildNodes Returns a value indicating whether the object has child objects.
Insertadjacentelement inserts an element at the specified location.
insertAdjacentHTML inserts the given HTML text in the element at the specified location.
insertAdjacentText inserts the given text at the specified location.
InsertBefore inserts the element as the child node of the parent object in the document hierarchy.
Mergeattributes copies all read/write tag attributes to the specified element.
Normalize merges adjacent Textnode objects to generate a regular Document Object model.
RemoveAttribute deletes the given label property of the object.
Removeattributenode deletes an attribute object from the object.
Removebehavior the behavior of the detached element.
RemoveChild deletes a child node from the element.
Removeexpression deletes an expression from the specified property.
Removenode deletes an object from the document hierarchy.
Replaceadjacenttext replaces the contiguous text of an element.
ReplaceChild replaces an existing child element with a new child element.
ReplaceNode replaces objects with other elements.
scrollIntoView scrolls the object to the visible range, arranging it to the top or bottom of the window.
SetActive sets the object to the current object without placing the object in focus.
SetAttribute sets the value of the specified label property.
Setattributenode sets the attribute object as part of the object.
SetExpression sets the expression for the specified object.
SwapNode the position of two objects in an Exchange document hierarchy.

Object

Object description
Runtimestyle represents the format and style of objects that are above the formatting and styles specified by the global style sheet, inline styles, and HTML tag attributes.
Style represents the current setting of all possible inline styles for a given element.

Style

Style Label Property Style Property Description
Accelerator accelerator Sets or gets a string indicating whether the object contains a shortcut key.
Background-attachment backgroundattachment Sets or gets how the background image is attached to objects within the document.
Background-color BackgroundColor Sets or gets the color of the object's content.
Background-position-x backgroundPositionX Sets or gets the x-coordinate of the Backgroundposition property.
Background-position-y backgroundPositionY Sets or gets the y-coordinate of the backgroundposition property.
Behavior behavior Sets or gets the location of the DHTML behavior.
Border-bottom BorderBottom Sets or gets the properties of the bottom border of an object.
Border-bottom-color borderBottomColor Sets or gets the color of the bottom border of an object.
Border-bottom-style borderBottomStyle Sets or gets the style of the bottom border of an object.
Border-bottom-width borderBottomWidth Sets or gets the width of the bottom border of the object.
Border-color bordercolor Sets or gets the border color of the object.
Border-left Borderleft Sets or gets the properties of the left border of the object.
Border-left-color borderLeftColor Sets or gets the color of the left border of the object.
Border-left-style borderLeftStyle Sets or gets the style of the left border of the object.
Border-left-width borderLeftWidth Sets or gets the width of the left border of the object.
Border-right borderright Sets or gets the properties of the right border of an object.
Border-right-color borderRightColor Sets or gets the color of the right border of the object.
Border-right-style borderRightStyle Sets or gets the style of the right border of an object.
Border-right-width borderRightWidth Sets or gets the width of the right border of the object.
Border-style BorderStyle Sets or gets the style of the left and right border of an object.
Border-top BorderTop Sets or gets the properties of the top border of an object.
Border-top-color borderTopColor Sets or gets the color of the top border of an object.
Border-top-style borderTopStyle Sets or gets the style of the top border of an object.
Border-top-width borderTopWidth Sets or gets the width of the top border of the object.
Border-width BorderWidth Sets or gets the width of the left and right border of the object.
Bottom bottom Sets or gets the position of the object relative to the bottom of the next anchored object in the document hierarchy.
Clear clear Sets or gets whether the object allows floating objects to be placed on the left, right, or both sides in case the next paragraph of text is displayed on a floating object.
Clip clip Sets or gets which part of the anchored object is visible.
Cursor cursor Sets or gets the mouse pointer that is used when the mouse pointer is pointing to an object.
Display display Sets or gets whether the object is to be rendered.
Filter filter Sets or gets a collection of filters or filters that are applied to an object.
Height height Sets or gets the height of the object.
Layout-grid Layoutgrid Sets or gets the combined document gridline properties for the specified text character layout.
Layout-grid-mode Layoutgridmode Sets or gets whether the text layout grid uses two-dimensional.
Left to set or get the position of the object relative to the left-hand edge of the next anchored object in the document hierarchy.
Margin margin sets or gets the top and bottom margins of an object.
Margin-bottom MarginBottom Sets or gets the width of the bottom margin of an object.
Margin-left MarginLeft Sets or gets the width of the left margin of the object.
Margin-right marginright Sets or gets the right margin width of the object.
Margin-top margintop Sets or gets the top margin width of an object.
Overflow-x overflowx Sets or gets how object content is managed when content exceeds the width of the object.
Overflow-y Overflowy Sets or gets how object content is managed when content exceeds the height of an object.
Pixelbottom Sets or gets the position below the object.
Pixelheight Sets or gets the height of the object.
Pixelleft Sets or gets the left position of the object.
Pixelright Sets or gets the right position of the object.
Pixeltop Sets or gets the top position of the object.
Pixelwidth Sets or gets the width of the object.
Posbottom Sets or gets the position below the object in the unit specified by the bottom label property.
Posheight Sets or gets the height of the object in the unit specified by the height label property.
Position position Sets or gets the positioning method used by the object.
Posleft Sets or gets the left position of the object in the unit specified by the left-hand label property.
Posright Sets or gets the right position of the object in the unit specified by a right label property.
Postop Sets or gets the position above the object in the unit specified by the top label property.
Poswidth Sets or gets the width of the object in the unit specified in the Width label property.
Right to set or get the position of the object relative to the right-hand edge of the next anchored object in the document hierarchy.
Float stylefloat Sets or gets the text on which side of the object to wrap.
Text-autospace Textautospace Sets or gets the automatic padding and the text's narrow space width adjustment.
Top up sets or gets the position of the object relative to the upper boundary of the next anchored object in the document hierarchy.
Visibility visibility Sets or gets whether the contents of the object are displayed.
Z-index ZIndex Sets or gets the stacking order of the anchored objects.
Zoom zoom Sets or gets the magnification of an object.

Comments

An IFRAME element is a document in a document, or it seems to be a floating frame (frame). The Frames collection provides access to the content of the IFRAME. Use the Frames collection to read and write the elements contained within the IFRAME. For example, if you want to access the backgroundcolor style of a body object within an IFRAME, the syntax should be:

Scolor = Document.frames ("Sframename"). Document.body.style.backgroundColor;

Through the object model of the page where the IFrame object is located, you can access the properties of the IFrame object, but you cannot access its contents. For example, the syntax for accessing the border style of an IFrame object should be:

Sbordervalue = Document.all.oFrame.style.border;

Note that the properties of an IFRAME must be accessed using a prefix document.all, such as Document.all.iframeId.marginWidth.
Internet Explorer 5.5 supports transparent content for floating frames. If you want to define transparent content for a floating frame, the following conditions must be met.

The Allowtransparency label property used with the IFRAME element must be set to true.
In an IFRAME content source document, the bgcolor label property of the Background-color or BODY element must be set to transparent.
See Using a transparent floating framework for more information on transparent floating frames.

This element is available in the HTML and scripts of Microsoft®internet Explorer 4.0.

This element is a block element.

This element requires closing the label.

Example

The following example uses the IFRAME element to create a frame that contains the page sample.htm.

<iframe id=iframe1 frameborder=0 scrolling=no src= "sample.htm" ></IFRAME>

The following example returns a reference to the all collection of documents contained in an IFRAME.

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.