两种形式 - 一个提交按钮? [英] Two forms - one submit button?

查看:185
本文介绍了两种形式 - 一个提交按钮?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有两种形式在我的网站。

I have TWO forms on my website.

是否有可能当我提交其中之一,它会采取表单数据从一个特定的领域中的其他形式?

Is it possible when I submit one of these, it will take form data from a particular field in the other form?

我使用的Recurly系统用PHP。

I am using the Recurly system with PHP.

推荐答案

您可以编写自己的功能。

You can write your own function.

function submit (){
   document.getElementById("firstform").submit();
   document.getElementById("secondform").submit();
}

您可以然后做一个按钮,调用此函数。

You can then make a button that calls this function.

如果这不起作用,尝试再次使用AJAX。

If this doesn't work, try again using ajax. Example

这篇关于两种形式 - 一个提交按钮?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆