How to add forms dynamically in javascript?
To create dynamic forms and elements in javascript is easy.

var newdiv = document.createElement('div'); // Creates the div
document.body.appendChild(newdiv);          // Adds the div to body


After that, you can access newdiv and change attributes of it, such as 

newdiv.className = "helloworld";