var formBody = [];
for (var property in submitLeadData) {
var encodedKey = encodeURIComponent(property);
var encodedValue = encodeURIComponent(`enter code here`submitLeadData[property]);
formBody.push(encodedKey + "=" + encodedValue);
}
formBody = formBody.join("&");
$.ajax({
url: 'post.php',
type: 'POST',
dataType: 'default: Intelligent Guess (Other values: xml, json, script, or html)',
data: submitLeadData,
success: function() {
$.ajax({
type: "GET",
url: submitBrokerLead,
data: formBody,
success: function(){
alert(5);
}
}
});
缺少什么?
答案 0 :(得分:1)
您不能在以下行中正确关闭您的功能:
$.ajax({
url: 'post.php',
type: 'POST',
dataType: 'default: Intelligent Guess (Other values: xml, json, script, or html)',
data: submitLeadData,
success: function() {
$.ajax({
type: "GET",
url: submitBrokerLead,
data: formBody,
success: function() {
alert(5);
}
}); //add the bracket '(' and semi-colon ';' here
} //add the curly bracket here
});