Thursday, January 19, 2012

Create DOM elements from client side

function makeNewNote(){
        mainDivElement = document.getElementById("mainDiv");
 
        newNote = document.createElement("div");
        newNote.setAttribute("id", "note"+getCurrentNumber());
 
        mainDivElement.appendChild(newNote);
 
        incrementCurrent();
 
      }
 
 
 

No comments: