只是關於JQuery的Ajax函數的一個簡單問題,更具體地說就是url參數。JQuery Ajax網址問題
我的目錄結構像這樣:
contact.html
process.php
- elements
- js
- jquery.js
- library.js
代碼如下
...
// Post with Ajax
$.ajax
({
type : 'POST',
url : '../../process.php',
data : fulldata,
success: function()
{
$('#contact_form #placeholder').html("<div id='success_box'><h3>Message Recieved</h3><p>We will be in touch very soon!</p></div>");
$('#contact_form form').hide();
},
error: function(xhr)
{
alert('Request Status: ' + xhr.status + ' Status Text: ' + xhr.statusText + ' ' + xhr.responseText);
}
});
return false;
的每次我提交表單,它吐出了一個錯誤,我認爲是網址。如何正確指定process.php文件以便使用Ajax進行提交?
感謝