创建一个新的p5.Element对象。
第一个参数tag
是一个HTML标签的字符串,例如'h5'
。
第二个参数content
是可选的。它是一个字符串,用于设置要插入新元素的HTML内容。新元素默认没有内容。
示例
语法
createElement(tag, [content])
参数
tag
字符串:
新元素的标签。
content
字符串:
要插入元素的HTML内容。
返回值
p5.Element: 新的p5.Element对象。
This page is generated from the comments in src/dom/dom.js . Please feel free to edit it and submit a pull request!