最新国产好看的视频,伊人天堂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
辽宁省| 桃源县| 绵竹市| 汕尾市| 利辛县| 奇台县| 崇义县| 灌阳县| 侯马市| 家居| 桃源县| 自贡市| 远安县| 比如县| 雅江县| 正镶白旗| 资中县| 外汇| 鞍山市| 新源县| 宁乡县| 桐柏县| 安陆市| 大连市| 亚东县| 会昌县| 伊宁县| 衡阳市| 祁连县| 类乌齐县| 湖南省| 宁海县| 宜川县| 东宁县| 南川市| 彭水| 珠海市| 沙湾县| 依兰县| 安塞县| 五峰|