0

なぜだろう

console.log(document.createElement("p").appendChild(document.createTextNode("some text")));

戻る

<TextNode textContent="some text">

ファイアーバグで?

4

1 に答える 1

3

appendChild関数をあなたに連鎖させたのでcreateElement、それが返すものはすべて最後の戻り値になります。あなたのconsole.logステートメントは、その最後の戻り値を記録します。

.appendChild()は、追加された子を返します

于 2013-05-01T11:04:35.267 に答える