リファレンス createElement()

createElement()

新しいp5.Elementオブジェクトを作成します。

最初のパラメータtagは、'h5'のようなHTML要素を表す文字列です。

2番目のパラメータcontentはオプションです。新しい要素に挿入するHTML コンテンツを設定する文字列です。デフォルトでは、新しい要素にはコンテンツがありません。

実例

シンタックス

createElement(tag, [content])

パラメーター

tag
String:

新しい要素のタグ。

content
String:

要素に挿入するHTMLコンテンツ。

リターン

p5.Element: 新しいp5.Elementオブジェクト。
Notice any errors or typos? Please let us know. Please feel free to edit src/dom/dom.js and open a pull request!

関連するリファレンス