click でフォーム要素を作成するボタンがあります。
私のaddelement
機能は次のようになります
function addElement(){
to = document.getElementById('top');
newId = document.createElement('div');
id = 'my'+this.num;
newId.setAttribute('id', id );
newId.innerHTML = "<input type = 'text' value = ''>";
to.appendChild(newId);
this.num++;
}
... テキスト入力フィールドを ID = 'top' のフォームにレンダリングし、フォーム要素ごとに動的な div を作成します
要素がフォーム内に入ったら、その要素を編集する方法を知りたいです。どうすればそれができますか?