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

appendChild Method

Internet Development Index

Appends an element as a child to the object.

What's New for Microsoft® Internet Explorer 6

This method now applies to the attribute object.

Syntax

oElement = object.appendChild(oNode)

Parameters

oNode Required. Object爐hat specifies the element to append.

Return Value

Returns燼 reference to the element that is appended to the object.

Remarks

The appendChild method appends elements to the end of the childNodes collection.

To display new elements on the page, you must append them within the body element. For example, the following syntax demonstrates how to add a div element to the body.

var oDiv=document.createElement("DIV");
document.body.appendChild(oDiv);

This method is accessible at run time. If elements are removed at run time, before the closing tag is parsed, areas of the document might not render.

Example

This example uses the appendChild method to add an item to an unordered list.

<SCRIPT>
function fnAppend(){
var oNewNode = document.createElement("LI");
oList.appendChild(oNewNode);
oNewNode.innerText="List node 5";
}
</SCRIPT>
<BODY>
<UL ID = oList>
<LI>List node 1
<LI>List node 2
<LI>List node 3
<LI>List node 4
</UL>
<INPUT
TYPE = "button"
VALUE = "Append Child"
onclick = "fnAppend()">
</BODY>

Standards Information

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

Applies To

A, ACRONYM, ADDRESS, attribute, B, BDO, BIG, BLOCKQUOTE, BODY, BUTTON, CAPTION, CENTER, CITE, CODE, COL, COLGROUP, COMMENT, DD, DEL, DFN, DIR, DIV, DL, DT, EM, FIELDSET, FONT, FORM, FRAMESET, HEAD, hn, HTML, I, IFRAME, 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, nextID, OL, OPTION, P, PLAINTEXT, PRE, Q, S, SAMP, SMALL, SPAN, STRIKE, STRONG, SUB, SUP, TABLE, TBODY, TD, TEXTAREA, TFOOT, TH, THEAD, TR, TT, U, UL, VAR, XMP

See Also

cloneNode, insertBefore, About the W3C Document Object Model
曲阜市| 太原市| 唐河县| 南平市| 凤翔县| 青铜峡市| 江永县| 忻城县| 西乌珠穆沁旗| 淳化县| 仁布县| 卢氏县| 周至县| 永德县| 象州县| 信丰县| 太仆寺旗| 明水县| 女性| 石泉县| 常宁市| 宁波市| 涞水县| 吴堡县| 蒲江县| 馆陶县| 江口县| 瑞金市| 田林县| 岳普湖县| 平昌县| 新竹县| 泸定县| 沭阳县| 沈丘县| 迭部县| 新郑市| 武宣县| 蒙自县| 蒙山县| 从化市|