Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/89.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 如何使用一个输入链接表单使用两个链接提交_Javascript_Jquery_Html_Forms_Form Submit - Fatal编程技术网

Javascript 如何使用一个输入链接表单使用两个链接提交

Javascript 如何使用一个输入链接表单使用两个链接提交,javascript,jquery,html,forms,form-submit,Javascript,Jquery,Html,Forms,Form Submit,我正在使用从我的联系人页面发送html信息 <form method="post" action = "https://formsubmit.co/ahmedoher01@gmail.com" enctype="multipart/form-data" novalidate> 到我的电子邮件现在我用它,它的工作非常好,我用这个代码 <input type="hidden" name="

我正在使用从我的联系人页面发送
html
信息

<form method="post" action = "https://formsubmit.co/ahmedoher01@gmail.com" enctype="multipart/form-data" novalidate>

到我的电子邮件现在我用它,它的工作非常好,我用这个代码

<input type="hidden" name="_next" value="www.paypal.com">

若要在提交后立即转到另一页,我想在提交后打开一个新的空白页,以便在客户提交后进行更多解释,请转到 paypal并在空白处打开一个新页面,例如google,感谢所有愿意提供帮助的人。

按钮

<!DOCTYPE html>

<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8" />
<title></title>
<script src="https://code.jquery.com/jquery-3.4.1.js" integrity="sha256- 
WpOohJOqMqqyKL9FccASB9O0KwACQJpFTUBLTYOVvVU=" crossorigin="anonymous"> 
</script>
</head>
<body>
<form name="myform" id="submitForm" method="post"></form>
<input type="button" id="btnClick" onclick="return onButtonSubmitClick()" 
name="submit" value="submit" />
<script>
    $(document).ready(function () {
        $('#btnClick').on('click', function () {
            document.forms["myform"].submit();
            window.open("https://www.google.com","_blank");
        });
    });
</script>
</body>
</html>

$(文档).ready(函数(){
$('btnClick')。在('click',函数(){
document.forms[“myform”].submit();
窗口打开(“https://www.google.com“,”空白“);
});
});

@swati你能帮忙吗?@AhmedSyam这没用。是否两者都提交了相同的内容。@AhmedSyam是否在按钮中添加了OnButtonsSubmitClick()函数?@AhmedSyam Submit```yes@AhmedSyam更改按钮类型提交到按钮。并在按钮上提交表单手动单击。