Uncaught SyntaxError: Unexpected identifier

$.ajax({
                    //请求头
                    type:"POST",
                    contentType:"application/x-www-form-urlencoded",
                    url:"http://localhost:8090/user/getotp",
                    
                    //传参
                    data:{
                        "telphone":$("#telphone").val(),
                    }//这里少了逗号

                    //两个回调,请求成功和请求失败
                    success:function(data){
                        if(data.status == "success"){
                            alert("otp已经发送到您的手机上,请注意查收");
                        }else{
                            alert("otp发送失败,原因是"+data.data.errMsg);
                        }
                    }
                    error:function(data){
                        alert("otp发送失败,原因为"+data.responseText);
                    }
                });

格式不对

原文地址:https://www.cnblogs.com/JimShi/p/11912473.html