Javascript examples for DOM HTML Element:Input Button
Click a button to call submit on a form
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <script type="text/javascript"> window.onload=function(){/* w w w. j a v a 2s . c om*/ function submitform() { document.myform.submit(); } } </script> </head> <body> <form name="myform" action="handle-data.php"> Search: <input type="text" name="query"> <button onclick="submitForm();">">Search</button> </form> </body> </html>