通过电子邮件发送JavaScript计算总数


Emailing javascript calculation totals

我需要通过电子邮件发送输入到表格中的所有信息以及总价格。我知道如何使用php发送表单,但总数不是表单字段。有什么想法吗?这是链接:http://www.redfivedesigns.com/mapp/estimate.html

谢谢

汤米

欢迎来到SO。如果您展示解决问题的方法,您的问题将得到最好的接受。

您的答案在于您需要根据提交的表单变量复制该逻辑以计算总价 http://www.redfivedesigns.com/mapp/js/formcalculations.js。如果你有总数作为隐藏输入,你很容易受到像我这样的人的影响,他们浏览这些网页,然后手动降低价格并获得折扣。

但是,如果您不在乎,只需将底部的 http://www.redfivedesigns.com/mapp/js/formcalculations.js 从

divobj.innerHTML = "Total Price For the estimate $"+estimatePrice;

divobj.innerHTML = "Total Price For the estimate $"+estimatePrice+"<input type='hidden' name='totalprice' value='"+estimatePrice+"'></input>";