How to edit an appended div
<p>I have a button which creates form elements on click . </p>

<p></p>

<p>My <code>addelement</code> function looks like this</p>

<pre><code>function addElement(){
    to = document.getElementById('top');
    newId = document.createElement('div');
    id = 'my'+this.num;
    newId.setAttribute('id', id );
    newId.innerHTML = "&lt;input type = 'text' value = ''&gt;";
    to.appendChild(newId);
    this.num++;
}
</code></pre>

<p>... which renders the text input field to a form with ID = 'top' and creates a dynamic div for every form element</p>

<p>Now once the element is inside the form, I want to know a way to edit that element. How could that be done?</p>
