我有一个联系表单,该表单提交到包含以下内容的 php 页面:
<?php
$to = 'emailtosendto';
$subject = 'New message from contact form';
$name = $_POST['fullname'];
$mail = $_POST['email'];
$company = $_POST['company'];
$phone = $_POST['phone'];
$comment = $_POST['comment'];
$message = $_POST['message'];
$body = 'Mr/Mrs '.$name.' wishes to contact us.
He\'s from a company called '.$company.'.
You can email him back at '.$mail.', or call him on '.$phone.'.
He was sneaky and found us through '.$comment.'.
He would like to say,
'.$message.'';
ini_set('sendmail_from', '$mail');
mail($to, $subject, $body);
header('location:./?sent');
?>
我现在已经将表单更改为一个很好的实时验证的 jQuery 表单,你可以在下面看到它的小提琴。
http://jsfiddle.net/swift29/6UC7m/
我在想如何更改任何此代码以仍然执行相同的功能,但使其出现一个弹出窗口,确认消息已使用 jQuery 发送,然后淡出并重置表单
在此先感谢,斯威夫特