繁体   English   中英

一键提供两个功能-计算和提交表单

[英]Two functions in one button - Calculate and Submit form

我目前正在使用可计算价格值的计算器,同时单击一次即可将表单字段提交到我的电子邮件中。 使用JavaScript / jQuery和HTML。 除了使用mailto:还有其他方法吗?

计算已经可以使用

go=$('button');

go.click(function(){

    //Bunch of code here

});

通过网络进行研究并没有明确的解决方案,因此我尝试在此处提出。

尝试这个...

$('button').click(function(){

    //Bunch of code here to calculate and assign to the html elements
    $('#formId').submit(); // code to submit form by using id or class

});

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM