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

offsetHeight Property

Internet Development Index

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

Syntax

HTMLN/A
Scripting[ iHeight = ] object.offsetHeight

Possible Values

iHeightInteger that receives the height, 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 elements on the page through the Dynamic HTML (DHTML)燚ocument Object Model (DOM), see Measuring Element Dimension and Location.

To comply with the Cascading Style Sheets, Level 1 (CSS1) Non-Microsoft link box model, Microsoft® Internet Explorer 6 and later calculate the height of objects differently when you use the !DOCTYPE declaration in your document to switch on standards-compliant mode. This difference may affect the value of the offsetHeight propety. When standards-compliant mode is switched on, the height property specifies the distance between the top and bottom edges of the bounding box that surrounds the object's content. When standards-compliant mode is not switched on, and with earlier versions of Internet Explorer, the height property also includes the border and padding belts that surround the object's bounding box. For more information, see CSS Enhancements in Internet Explorer 6.

Examples

This example adjusts the size of a clock's readout to fit the current width and height of the document body.

<HTML>
<HEAD>
<TITLE>A Simple Clock</TITLE>
<SCRIPT LANGUAGE="JScript">
function startClock()
{
window.setInterval("Clock_Tick()", 1000);
Clock_Tick();
}
var iRatio = 4;
function Clock_Tick()
{
var dToday = Date();
var sTime = dToday.substring(11,19);
var iDocHeight = document.body.offsetHeight;
var iDocWidth = document.body.offsetWidth;
if ((iDocHeight*iRatio)>iDocWidth)
iDocHeight = iDocWidth / iRatio;
document.all.MyTime.innerText = sTime;
document.all.MyTime.style.fontSize = iDocHeight;
}
</SCRIPT>
</HEAD>
<BODY onload="startClock()">
<P ID="MyTime">&nbsp;</P>
</BODY>
</HTML>

This example uses the offsetHeight property and the clientHeight property to show different ways of measuring the object size.

<DIV ID=oDiv STYLE="overflow:scroll; width:200; height:100"> . . . </DIV>
<BUTTON onclick="alert(oDiv.clientHeight)">client height</BUTTON>
<BUTTON onclick="alert(oDiv.offsetHeight)">offset height</BUTTON>
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, TFOOT, TH, THEAD, TR, TT, U, UL, VAR, XMP
卫辉市| 轮台县| 宁强县| 牙克石市| 阳原县| 永善县| 璧山县| 永寿县| 图们市| 汉源县| 成武县| 长顺县| 综艺| 中宁县| 沽源县| 肇源县| 遂川县| 盱眙县| 扬州市| 宁强县| 重庆市| 麟游县| 蓬溪县| 肥乡县| 高唐县| 揭西县| 普安县| 长汀县| 龙江县| 通州市| 眉山市| 屯留县| 德兴市| 西乌| 阿图什市| 渝中区| 龙井市| 寻乌县| 镇巴县| 焉耆| 永仁县|