Uncaught SyntaxError: Invalid shorthand property initializer

$.ajax({                   
                            url : '../../collateralQuery/getCollateralQueryDetail',
                            type : 'POST',
                            data : {},
                            dataType : 'json',
                            success : function(data) {
                                alert("success");
                            },
                            error : function() {
                                alert("error");
                        },
                    } 

Uncaught SyntaxError: Invalid shorthand property initializer

看看是不是你的 : 写成了 = 我已经在这里错了很多次了,尤其是url的,记录一下

原文地址:https://www.cnblogs.com/kevinZhu/p/7810597.html