最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

offsetParent Property

Internet Development Index

Retrieves a reference to the container object that defines the offsetTop and offsetLeft properties of the object.

Syntax

HTMLN/A
Scripting[ oElement = ] object.offsetParent

Possible Values

oElement Object that receives the container object.

The property is read-only. The property has no default value.

Remarks

Most of the time the offsetParent property returns the body object.

Note  In Microsoft® Internet Explorer 5, the offsetParent property returns the table object for the td object; in Internet Explorer 4.0 it returns the tr object. You can use the parentElement property to retrieve the immediate container of the table cell.

Example

This example shows how to determine the position of a td object. Although the td object appears to the far right in the document, its position is close to the x-axis and y-axis, because its offset parent is a table object rather than the document body. For Internet Explorer 4.0, this same example returns a position of 0,0 because the offset parent is the table row.

<HTML>
<HEAD>
<TITLE>Elements: Positions</TITLE>
<SCRIPT LANGUAGE="JScript">
function showPosition()
{
var oElement = document.all.oCell;
alert("The TD element is at (" + oElement.offsetLeft +
"," + oElement.offsetTop + ")\n" + "The offset parent is "
+ oElement.offsetParent.tagName );
}
</SCRIPT>
</HEAD>
<BODY onload="showPosition()">
<P>This document contains a right-aligned table.
<TABLE BORDER=1 ALIGN=right>
<TR>
<TD ID=oCell>This is a small table.</TD>
</TR>
</TABLE>
</BODY>
</HTML>

Standards Information

There is no public standard that applies to this property.

Applies To

A, ACRONYM, ADDRESS, APPLET, AREA, B, BDO, BIG, BLOCKQUOTE, BODY, BR, BUTTON, CAPTION, CENTER, CITE, CODE, COL, COLGROUP, COMMENT, CUSTOM, DD, DEL, DFN, DIR, DIV, DL, DT, EM, EMBED, FIELDSET, FONT, FORM, FRAME, hn, HR, I, IFRAME, IMG, INPUT type=button, INPUT type=checkbox, INPUT type=file, INPUT type=hidden, INPUT type=image, INPUT type=password, INPUT type=radio, INPUT type=reset, INPUT type=submit, INPUT type=text, INS, KBD, LABEL, LEGEND, LI, LISTING, MAP, MARQUEE, MENU, NOBR, OBJECT, OL, OPTION, P, PLAINTEXT, PRE, Q, RT, RUBY, S, SAMP, SELECT, SMALL, SPAN, STRIKE, STRONG, SUB, SUP, TABLE, TBODY, TD, TEXTAREA, TFOOT, TH, THEAD, TR, TT, U, UL, VAR, XMP

See Also

Measuring Element Dimension and Location
深圳市| 界首市| 绥德县| 无极县| 神木县| 阿图什市| 保定市| 四子王旗| 新沂市| 新民市| 永济市| 平山县| 赫章县| 易门县| 台前县| 钟山县| 怀远县| 敦化市| 中西区| 永济市| 沙坪坝区| 濮阳县| 沈阳市| 荥经县| 霞浦县| 广西| 峨山| 寻乌县| 游戏| 芒康县| 巢湖市| 安康市| 满洲里市| 霸州市| 台东市| 宾川县| 环江| 太仆寺旗| 鄂州市| 清水河县| 威信县|