Tag: Html5

Dynamically create form in javascript on fly

To create a form dynamically using JavaScript on fly of the webpage. This which helps to create form and input controls dynamically. [javascript] /* To create form with javascript */ var form = document.createElement("form"); form.setAttribute(‘method’,"post"); // form method form.setAttribute(‘action’,"test.php"); // form action url form.setAttribute(‘name’,"frmName"); // form name form.setAttribute(‘id’,"frmId"); // form ID form.setAttribute(‘target’,"_blank"); // form target …

Continue reading

Permanent link to this article: https://blog.openshell.in/2013/12/dynamically-create-form-in-javascript-on-fly/