Browser support:
Specifies a nameable window region.
This element cannot have a closing tag.
JavaScript page for this element: frame .
Possible members:
ALLOWTRANSPARENCY
Sets whether a frame element (frame or iframe ) can be transparent.
borderColor
Sets the color of the border.
class
Sets the style class or classes that belong to the element.
contentEditable
Sets whether the contents of the object are editable.
dataFld
Specifies which field of a given data source should be bound to the specified object.
dataFormatAs
Specifies how data is to be rendered.
dataSrc
Sets the identifier of the data source that is bound to the element.
frameBorder
Sets whether the frame is surrounded by a 3-D border.
id
Sets a unique identifier for the object.
language
Sets the scripting language for the current element. Use it only for the script element.
longDesc
Specifies the URI (Uniform Resource Identifier) of the long description of a frame , iframe or img element.
marginHeight
Sets the top and bottom margins for a frame element.
marginWidth
Sets the left and right margins for a frame element.
name
Sets the initial name of the contained window.
NORESIZE
Specifies whether a frame window is resizable.
scrolling
Sets whether a frame has scrollbars.
security
Applies the user's Restricted Sites Internet Explorer security zone settings to an individual frame or iframe .
src
Sets the location of an associated file for an object.
style
Sets an inline style associated with an element.
tabIndex
Specifies the tabbing order for keyboard navigation using the TAB key.
title
Specifies a tooltip for an element.
unSelectable
Sets whether the selection process can start in an element's content.
onActivate
Occurs when an element becomes active.
onAfterUpdate
Occurs on a databound object after it updates the data in the data source object.
onBeforeActivate
Occurs before an element becomes active.
onBeforeDeActivate
Occurs on the active element before it loses the active state.
onBeforeUpdate
Occurs on a databound object before it updates the data in the data source object.
onBlur
Occurs when an element loses focus.
onControlSelect
Occurs before a control is selected in an editable region.
onDeActivate
Occurs on the active element when it loses the active state.
onErrorUpdate
Occurs on a databound object when it cannot update the data in the data source object.
onFilterChange
Occurs after a filter has changed or finished a transition.
onFocus
Occurs when an element receives focus.
onFocusIn
Occurs before an element receives focus.
onFocusOut
Occurs after an element loses focus.
onLoad
Occurs when an object has been loaded.
onMouseEnter
Occurs when the user moves the mouse pointer into the area of an element.
onMouseLeave
Occurs when the user moves the mouse pointer out of the element.
onMouseOut
Occurs when the user moves the mouse pointer out of the element.
onMouseOver
Occurs when the user moves the mouse pointer into the element.
onMove
Occurs when the position of an element's top-left corner is changed.
onMoveEnd
Occurs when the user stops dragging an absolute or relative positioned element in an editable region.
onMoveStart
Occurs when the user starts dragging an absolute or relative positioned element in an editable region.
onPropertyChange
Occurs every time when the value of an element's property is changed.
onReadyStateChange
Occurs when the load state of the data that belongs to an element or a HTML document changes.
onResize
Occurs when the size of an object has changed.
onResizeEnd
Occurs when the user stops resizing an element in an editable region.
onResizeStart
Occurs when the user starts to resize an element in an editable region.
background
Specifies up to five separate background properties, in a shorthand form.
background-attachment
Specifies whether the background-image should scroll with the contents of the object or not.
background-color
Specifies the color to use for the background of the object.
background-image
Specifies the image to use as the background of the object.
background-position
Sets the position of the background-image within the element.
background-repeat
Specifies how to tile the background-image relative to the upper-left corner of the container object.
behavior
Sets the URL of a behavior file.
border
Sets up to three separate border properties, in a shorthand form.
border-bottom
Sets the color, style and width properties for the element's bottom border, in a shorthand form.
border-bottom-color
Specifies the color of the element's bottom border.
border-bottom-style
Specifies the style of the element's bottom border.
border-bottom-width
Specifies the width of the element's bottom border.
border-color
Specifies the color of the element's border.
border-left
Specifies the color, style and width properties for the element's left border, in a shorthand form.
border-left-color
Specifies the color of the element's left border.
border-left-style
Specifies the style of the element's left border.
border-left-width
Specifies the width of the element's left border.
border-right
Specifies the color, style and width properties for the element's right border, in a shorthand form.
border-right-color
Specifies the color of the element's right border.
border-right-style
Specifies the style of the element's right border.
border-right-width
Specifies the width of the element's right border.
border-style
Specifies the style of the element's border.
border-top
Specifies the color, style and width properties for the element's top border, in a shorthand form.
border-top-color
Specifies the color of the element's top border.
border-top-style
Specifies the style of the element's top border.
border-top-width
Specifies the width of the element's top border.
border-width
Specifies the width of the element's border.
display
Specifies the element's display type.
filter
Specifies the filter or collection of filters applied to the object.
layout-grid
Specifies up to four separate layout-grid properties that specify the layout of text characters.
layout-grid-mode
Specifies whether the text layout grid uses one or two dimensions.
padding
Specifies a shorthand property for setting the top, right, bottom and left spaces between an element's border and its contents, in that order.
padding-bottom
Specifies the space between an element's bottom border and its contents.
padding-left
Specifies the space between an element's left border and its contents.
padding-right
Specifies the space between an element's right border and its contents.
padding-top
Specifies the space between an element's top border and its contents.
visibility
Specifies whether the element is visible.
zoom
Specifies the zoom level of the element's content.
Example HTML code 1:
This example illustrates the use of the frame element:
Code
topFrame.htm
mainFrame.htm
< frameset rows = "110,*" cols = "*" border = "10px" >
< frame src = "topFrame.htm" name = "topFrame" scrolling = "No" />
< frame src = "mainFrame.htm" name = "mainFrame" />
</ frameset >
< !DOCTYPE html >
< html >
< head >
< meta charset = "utf-8" />
</ head >
< body >
< h1 > Contents of the top frame </ h1 >
May contain menu items or a logo.
</ body >
</ html >
< !DOCTYPE html >
< html >
< head >
< meta charset = "utf-8" />
< script type = "text/javascript" >
function AddRow (statTable, element, attr, attrValue) {
if (attrValue == null )
attrValue = element. getAttribute (attr);
var row = document . createElement ( "tr" );
var nameCell = document . createElement ( "td" );
var valueCell = document . createElement ( "td" );
nameCell. innerHTML = attr;
valueCell. innerHTML = attrValue;
row. appendChild (nameCell);
row. appendChild (valueCell);
statTable. appendChild (row);
}
function CreateFramesetStat () {
var statTable = document . getElementById ( "frameset_stat" );
var frameSet = window . frameElement . parentNode ;
AddRow (statTable, frameSet, "border" );
AddRow (statTable, frameSet, "borderColor" );
AddRow (statTable, frameSet, "frameBorder" );
AddRow (statTable, frameSet, "frameSpacing" );
AddRow (statTable, frameSet, "cols" );
AddRow (statTable, frameSet, "rows" );
}
function CreateTopFrameStat () {
var statTable = document . getElementById ( "topframe_stat" );
var frame = parent . frames [ 'topFrame' ]. frameElement ;
AddRow (statTable, frame, "noResize" , frame. noResize );
AddRow (statTable, frame, "scrolling" );
}
function CreateMainFrameStat () {
var statTable = document . getElementById ( "mainframe_stat" );
var frame = window . frameElement ;
AddRow (statTable, frame, "noResize" , frame. noResize );
AddRow (statTable, frame, "scrolling" );
}
function CreateStat () {
CreateFramesetStat ();
CreateTopFrameStat ();
CreateMainFrameStat ();
}
</ script >
</ head >
< body onload = "CreateStat ()" >
< table >
< thead >
< tr >
< th > Frameset </ th >
< th > Top frame </ th >
< th > Main frame </ th >
</ tr >
</ thead >
< tbody >
< tr >
< td valign = "top" >
< table border = "1px" cellspacing = "2px" >
< thead >
< tr >
< th > name </ th >
< th > value </ th >
</ tr >
</ thead >
< tbody id = "frameset_stat" >
</ tbody >
</ table >
</ td >
< td valign = "top" >
< table border = "1px" cellspacing = "2px" >
< thead >
< tr >
< th > name </ th >
< th > value </ th >
</ tr >
</ thead >
< tbody id = "topframe_stat" >
</ tbody >
</ table >
</ td >
< td valign = "top" >
< table border = "1px" cellspacing = "2px" >
< thead >
< tr >
< th > name </ th >
< th > value </ th >
</ tr >
</ thead >
< tbody id = "mainframe_stat" >
</ tbody >
</ table >
</ td >
</ tr >
</ tbody >
</ table >
</ body >
</ html >
Did you find this example helpful?
yes
no
Related pages:
External links:
Share:
Digg
Del.icio.us
Reddit
Facebook
Twitter
Diigo
User Contributed Comments