-1
java scriptを使用してHTML要素に新しい段落を追加したいが、無効な追加機能のエラーが発生する。未知の型エラー:e_type.appendchildは関数ではありません。 JavaScript内に要素を追加中
**// Html code :-**
<button onclick= "add()">Click me to add New text.. </button>
**// JavaScript code :-**
function add()
{
var e_type = document.createElement("p");
var text = document.createTextNode("Hello Again..!");
e_type.appendchild(text); // error- e_type.appendchild is not a function
var parent_type = document.getElementById("self");
parent_type.appendchild(e_type);
}
** Thanks @ T.J.クラウダー** –