[JavaScript] 通过JS代码提交(submit)表单 →→→→→进入此内容的聊天室

来自 , 2020-10-31, 写在 JavaScript, 查看 101 次.
URL http://www.code666.cn/view/5982e32d
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <script>
  5. function formSubmit()
  6. {
  7. document.getElementById("frm1").submit();
  8. }
  9. </script>
  10. </head>
  11. <body>
  12.  
  13. <p>Enter some text in the fields below, then press the "Submit form" button to submit the form.</p>
  14.  
  15. <form id="frm1" action="form_action.asp">
  16. First name: <input type="text" name="fname"><br>
  17. Last name: <input type="text" name="lname"><br><br>
  18. <input type="button" onclick="formSubmit()" value="Submit form">
  19. </form>
  20.  
  21. </body>
  22. </html>
  23.  
  24. //javascript/7938

回复 "通过JS代码提交(submit)表单"

这儿你可以回复上面这条便签

captcha