ajax don';t调用成功或错误函数


ajax don't call the success or error function

这是我的ajax代码:

<html>
<head>
<script type="text/javascript" src="jquery-2.1.1.js"></script>
<script type="text/javascript">
function la(){
alert("a");
$.ajax({
    type: "POST",
    url: "ajax.php",
    data: {action:'call'},
    success:function(){
        alert('aaaaa');
    },
    error: function{}{
        alert('bbb');
    }
    });
}
</script>
</head>
<body>
    <button type="button" onclick="la()">Click me</button>
</body>
</html>

和ajax.php:

<?php
if($_POST['action'] == 'call'){
    echo "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb";
} else{
    echo "ccccccccccccccccccccccccccccccccc";
}
?>

当我点击按钮时,函数la()不会执行,警报("a")也不会执行

(我的jquery安装成功)

如果错误回调函数出现语法错误,请将error: function{}更改为error: function()