Javascript examples for DOM:Document getElementById
Correct TypeError: document.getElementById(...).submit is not a function
<html> <head> <script> function formSubmit()// w w w. j a v a 2s.c om { document.getElementById('g_form').submit(); // Change the Id here } </script> </head> <body> <form action="class003.php" id="g_form" method="POST"> <input type="text" name="f1" value=""> </form> <div id="web" onclick="formSubmit()"> click </div> </body> </html>