<!doctype html> <html> <head> <script> function formsubmit() { document.getelementbyid("frm1").submit(); } </script> </head> <body> <p>enter some text in the fields below, then press the "submit form" button to submit the form.</p> <form id="frm1" action="form_action.asp"> first name: <input type="text" name="fname"><br> last name: <input type="text" name="lname"><br><br> <input type="button" onclick="formsubmit()" value="submit form"> </form> </body> </html>
更多通过js代码提交(submit)表单。
