简体   繁体   English

属性列表后缺少语法错误}

[英]syntax error missing } after property list

my browser keeps shouting at me with the syntax error: missing } after property list, and I have no idea why. 我的浏览器一直在用语法错误大叫我:属性列表后缺少},我也不知道为什么。 Here's the relevent code. 这是相关的代码。 Thanks in advance. 提前致谢。

function addToDb()
{
    var source = "SoundCloud";
    var partyKey = "4";
    var id = "0987654321";
    jQuery.ajax({
        type: "POST",
        url: 'connect.php',
        dataType: 'json',
        data: {functionname: 'addSong', arguments: [id, source,partyKey]},
        success: window.alert("check your db"); //here I get the error
    });
};

success should be a function. success应该是一种功能。

  success: window.alert("check your db");
});

ought to be: 必定是:

  success: function() { window.alert("check your db"); }
});

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM