Javascript examples for DOM HTML Element:Input Submit
You can create an <input> element with type="submit" by using the document.createElement() method:
<!DOCTYPE html> <html> <body> <button onclick="myFunction()">create a Submit Button</button> <script> function myFunction() {/* w ww .j av a 2s . com*/ var x = document.createElement("INPUT"); x.setAttribute("type", "submit"); document.body.appendChild(x); } </script> </body> </html>