我一直在使用$ .ajax方法调用API进行验证&随后处理请求。我试图调用它,但每次请求失败时都会失败:
Exception: [Exception... "The URI scheme corresponds to an unknown protocol handler" nsresult: "0x804b0012 (NS_ERROR_UNKNOWN_PROTOCOL)" location: "JS frame :: http://localhost:90/project/assets/plugins/jquery/jquery.min.js :: .send :: line 5" data: no]
我的代码示例如下:
$('#signupProcess-form').on('click', function (e) {
var dataObject = {firstName: $('#userFirstName').val(), lastName: $('#userLastName').val(), email: $('#userEmail').val(), password: $('#userPassword').val()};
console.log(dataObject);
$.ajax({
url:'localhost:90/project/php/scripts/validation/signup/validation-signup.php',
type: 'POST',
data: dataObject,
datatype: "json",
success: function (data) {
var response = $.parseJSON(data);
if (response.statusCode == 200) {
submitSignupForm(dataObject);
}
},
error: function (jqXHR, textStatus, errorThrown) {
alert('Exception: ' + errorThrown);
}
});
e.preventDefault();
});
这里缺少什么或任何不起作用的过程。需要帮助