为什么Ajax脚本不在IIS 7.5 Win 2008 R2服务器上运行?
// Retrieve rates and update partial view$(function () {
$('#reservSearch').submit(function () {
if ($(this).valid()) {
$("#theModal").modal("show"); // Display the in progress.....
$.ajax({
url: '/Home/GetRates', // URL for the request
data: $("#reservSearch").serialize(), // the data to send (will be converted to a query string)
type: "POST", // whether this is a POST or GET request
dataType: 'html', // the type of data we expect back
success: function (data) { // code to run if the request succeeds; The response is passed to the function
$("#theModal").modal("hide"); // Close the in progress modal.....
$('#ratesView').html(data); // Fill div with results
},
error: function (xhr, status) {
// code to run if the request fails; the raw request and status codes are passed to the function
$("#theModal").modal("hide"); // Close the in progress modal.....
alert('Error: Retrieving parking rates' + "</br>" + xhr.error);
}
});
}// // it is important to return false in order to cancel the default submission of the form and perform the AJAX call
return false;
});});
暮色呼如
天涯尽头无女友
SMILET
随时随地看视频慕课网APP