您好,欢迎来到三六零分类信息网!老站,搜索引擎当天收录,欢迎发信息

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

2024/5/5 15:41:34发布18次查看
通过js代码提交(submit)表单,将提交按钮的类型设置为普通button,然后添加onclick属性
<!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)表单。
该用户其它信息

VIP推荐

免费发布信息,免费发布B2B信息网站平台 - 三六零分类信息网 沪ICP备09012988号-2
企业名录 Product