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

offsetTop Property

Internet Development Index

Retrieves the calculated top position of the object relative to the layout or coordinate parent, as specified by the offsetParent property.

Syntax

HTMLN/A
Scripting[ iCoord = ] object.offsetTop

Possible Values

iCoordInteger that receives the top position, in pixels.

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

Remarks

You can determine the location, width, and height of an object by using a combination of the offsetLeft, offsetTop, offsetHeight, and offsetWidth properties. These numeric properties specify the physical coordinates and dimensions of the object relative to the object's offset parent.

For more information about how to access the dimension and location of objects on the page through the Dynamic HTML (DHTML)燚ocument Object Model (DOM), see Measuring Element Dimension and Location.

Example

This example uses the offsetTop property to determine whether an object is in the user's view.

<HTML>
<HEAD>
<SCRIPT>
function isinView(oObject)
{
var oParent = oObject.offsetParent;
var iOffsetTop = oObject.offsetTop;
var iClientHeight = oParent.clientHeight;
if (iOffsetTop > iClientHeight) {
alert("Special Text not in view. Expand Window to put Text in View.");
}
else{
alert("Special Text in View!");
}
}
</SCRIPT>
</HEAD>
<BODY onload="window.resizeTo(430,250)" onclick="isinView(oID_1)"  SCROLL=NO>
<DIV STYLE="position:absolute;left:20px">Click anywhere in window to see if special text is in
view.</DIV>
<DIV id="oID_1" STYLE="position:absolute; left:50px;top:300px;width:280px;color:lightGreen;
font-size:large;font-weight:bold;background-color:hotPink;font-family:Arial">
Here's some special text
</DIV>
</BODY>
</HTML>
This feature requires Microsoft® Internet Explorer 4.0 or later. Click the following icon to install the latest version. Then reload this page to view the sample.

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, 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=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, TextRange, TFOOT, TH, THEAD, TR, TT, U, UL, VAR, XMP

See Also

boundingHeight, boundingLeft, boundingTop, boundingWidth
聂拉木县| 浠水县| 承德市| 寿宁县| 宜君县| 屯门区| 曲松县| 赤城县| 措美县| 察隅县| 游戏| 阜阳市| 乐山市| 隆回县| 建瓯市| 方城县| 霍邱县| 土默特右旗| 利川市| 湖南省| 北宁市| 朔州市| 井陉县| 莎车县| 华坪县| 玛沁县| 乐山市| 昆山市| 开远市| 南平市| 堆龙德庆县| 宜丰县| 昌图县| 湖南省| 边坝县| 梓潼县| 诸城市| 中阳县| 闽侯县| 彭山县| 房产|