3 回答
TA贡献1785条经验 获得超8个赞
尝试在您的 ajax 调用中添加缓存:false
$.ajax({
type: "POST",
url: '/Home/InsertManualBookingForm',
cache:false,
data: {
Name: name,
ContactNo: contact,
Email: email,
BookingDateTime: bookingDate,
PickUpLocation: pickupLocation,
DropOffLocation: dropOffLocation,
FlightNumber: flight,
Passenger: passenger,
Luggage: luggage,
Message: message,
Language: lang,
HoursNeeded: hours,
DaysNeeded: days
},
success: function (data) {
swal("an email will be sent to you shortly", {
icon: "success",
});
// document.getElementById("manualBooking").reset();
}
});
让我们知道它是否有效
PS:在ajax调用之前在提交处理程序中获取表单的值(姓名、联系人编号、电子邮件...等),可能这就是它总是从第一次调用中获取值的原因。
- 3 回答
- 0 关注
- 196 浏览
添加回答
举报