两个功能合二为一 - 计算和提交表单

Two functions in one button - Calculate and Submit form

本文关键字:计算 提交 表单 合二为一 功能 两个      更新时间:2023-09-26

我目前正在使用一个计算器来计算价格价值,同时只需单击一下按钮即可将表单字段提交到我的电子邮件中。在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
});