最新国产好看的视频,伊人天堂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
合肥市| 利辛县| 邵武市| 永泰县| 沁水县| 仙桃市| 永胜县| 博白县| 泰安市| 北宁市| 临高县| 垫江县| 惠水县| 突泉县| 永平县| 额尔古纳市| 鄂托克前旗| 绥宁县| 郓城县| 和硕县| 格尔木市| 安西县| 南丹县| 凤台县| 福泉市| 墨竹工卡县| 禄劝| 古田县| 新民市| 高尔夫| 竹山县| 黄梅县| 渭源县| 沾化县| 邵阳县| 禄劝| 台州市| 宁都县| 礼泉县| 彩票| 临潭县|