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

getElementById Method

Internet Development Index

Returns a reference to the first object with the specified value of the ID attribute.

Syntax

oElement = document.getElementById(sIDValue)

Parameters

sIDValue Required. String爐hat specifies the value of an ID attribute.

Return Value

Returns the first object with the same ID attribute as the specified value.

Remarks

If the ID value belongs to a collection, the getElementById method returns the first object in the collection.

Example

This example uses the getElementById method to return the first occurrence of the ID attribute value, oDiv.

<SCRIPT>
function fnGetId(){
// Returns the first DIV element in the collection.
var oVDiv=document.getElementById("oDiv1");
}
</SCRIPT>
<DIV ID="oDiv1">Div #1</DIV>
<DIV ID="oDiv2">Div #2</DIV>
<DIV ID="oDiv3">Div #3</DIV>
<INPUT TYPE="button" VALUE="Get Names" onclick="fnGetId()">

Standards Information

This method is defined in World Wide Web Consortium (W3C) Document Object Model (DOM) Level 1 Non-Microsoft link.

Applies To

document

See Also

About the W3C Document Object Model
周口市| 仪陇县| 临安市| 监利县| 定州市| 天峻县| 什邡市| 南澳县| 宝应县| 元谋县| 合作市| 芦山县| 灌云县| 中超| 东乡族自治县| 赤城县| 福海县| 乌鲁木齐市| 家居| 锡林郭勒盟| 深水埗区| 广安市| 阳高县| 云阳县| 柏乡县| 杂多县| 上思县| 木兰县| 茶陵县| 浦县| 万年县| 乳源| 台东市| 保康县| 格尔木市| 曲水县| 大化| 沭阳县| 毕节市| 英山县| 高雄市|