Create and add input submit button to form using Javascript - Javascript DOM HTML Element

Javascript examples for DOM HTML Element:Form Event

Description

Create and add input submit button to form using Javascript

Demo Code

ResultView the demo in separate window

<html>
   <head></head>
   <body onload="tid=setInterval('refresh()',1000);"> 
      <form method="post" action="rwar.php" id="form"> 
         <script language="JavaScript">
            function refresh()//from w  ww  .j  a  va  2  s  . c  o m
            {
                var HTML = "";
                HTML += "<input type=submit value=makefile>";
                document.getElementById("form").innerHTML += HTML;
            }
            
         </script> 
      </form>  
   </body>
</html>

Related Tutorials