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

add Method

Internet Development Index

Adds an element to the areas, controlRange, or options collection.

Syntax

object.add(oElement [, iIndex])

Parameters

oElement Required. Object爐hat specifies the element to add to the collection.
iIndex Optional. Integer爐hat specifies the index position in the collection where the element is placed. If no value is given, the method places the element at the end of the collection.

Return Value

No return value.

Remarks

Before you can add an element to a collection, you must create it first by using the createElement method.

This method can be used to add elements only after the page loads.

If the method is applied inline, a run-time error occurs.

Example

This example uses the add method to insert an object into the options collection of a select object.

<SELECT ID="oSelect">
<OPTION VALUE="1">One</OPTION>
</SELECT>
<SCRIPT>
var oOption = document.createElement("OPTION");
oSelect.options.add(oOption);
oOption.innerText = "Two";
oOption.value = "2";
</SCRIPT>

Standards Information

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

Applies To

areas, controlRange, options, SELECT

See Also

remove
黄龙县| 岢岚县| 沛县| 石棉县| 德格县| 武宁县| 肥西县| 泾源县| 当雄县| 犍为县| 朝阳市| 清涧县| 忻州市| 文昌市| 泾川县| 克东县| 峡江县| 彭水| 桦甸市| 保康县| 云南省| 安泽县| 沧州市| 大石桥市| 阳江市| 湘潭县| 铜梁县| 新龙县| 四川省| 上高县| 密山市| 晋州市| 梓潼县| 梅州市| 高清| 乌拉特中旗| 邢台县| 荥经县| 太和县| 内丘县| 云梦县|