레퍼런스 child()

child()

Attaches the element as a child of another element.

myElement.child() accepts either a string ID, DOM node, or p5.Element. For example, myElement.child(otherElement). If no argument is provided, an array of children DOM nodes is returned.

예제

구문

child()
child([child])

매개변수

child
String|p5.Element: the ID, DOM node, or p5.Element to add to the current element

반환값

Node[]: an array of child nodes.

관련 레퍼런스