我是靠谱客的博主 爱笑嚓茶,这篇文章主要介绍一个form表单,有两个提交按钮,分别提交到不同页面(或不同的方法中),现在分享给大家,希望可以做个参考。

复制代码
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>支付测试模板</title> </head> <body> <form action="" name="pay" method="post" enctype="multipart/form-data"> 评估类型:<input type="text" name="assess_type"/><br/> 购买年限:<input type="text" name="assess_year"/><br/> 邀请码数量:<input type="text" name="code_num"/><br/> 团队报告购买年限:<input type="text" name="report_year"/><br/> 团队报告是否开发票:<input type="text" name="report_bill"/><br/> 团队报告的姓名:<input type="text" name="report_address_uname"/><br/> 团队报告的电话:<input type="text" name="report_address_mobile"/><br/> 团队报告的地址:<input type="text" name="report_address"/><br/> 单价:<input type="text" name="price"/><br/> 数量:<input type="text" name="num"/><br/> 总金额:<input type="text" name="total_fee"/><br/> <button onclick="wei()"/>微信支付</button> <button onclick="zhi()"/>支付宝支付</button> </form> </body> </html> <script> function wei(){ // document.("表单的name值").action // document.("表单的name值").submit document.pay.action="{:U('Home/Payment/getQrcode')}"; document.pay.submit(); } function zhi() { document.pay.action = "{:U('Home/Payment/doalipay')}"; document.pay.submit(); } </script>

最后

以上就是爱笑嚓茶最近收集整理的关于一个form表单,有两个提交按钮,分别提交到不同页面(或不同的方法中)的全部内容,更多相关一个form表单,有两个提交按钮,分别提交到不同页面(或不同内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(118)

评论列表共有 0 条评论

立即
投稿
返回
顶部