缺席)参数列表后。这有什么缺失?

时间:2017-12-08 13:22:50

标签: javascript jquery

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);
            }


}

});

缺少什么?

1 个答案:

答案 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
});