SyntaxError:期望表达式,得到'<'

时间:2015-12-29 06:33:29

标签: javascript jquery html jsp

我已经通过了很多例子并尝试了这一点,但没有取得成功,它显示了这样的错误。解决此错误的正确方法是什么?

<!DOCTYPE HTML>

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>IX-ONE Sample Application</title>
        <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>   
    </head>
    <body>
        <div id="mycontainer"></div>


        <script type="text/javascript">

    $( document ).ready(function() { 

         $.ajax({  
                url:'https://exchange.ix-one.net/',  
                type:'post',  // or put
                contentType: 'application/json', // type of data
                Authorization:'TokenString',
                            data: '{“EntityName” : “Product”,“PropertyName” : “Allergens”}', // make JSON string
                    async: true,
                    dataType: 'jsonp', //you may use jsonp for cross origin request
                    crossDomain: true,
                    success: function (data) {
                        alert(data);
                        $('#mycontainer').val(data);
                    }
                });

            });

        </script>
    </body>
</html>

enter image description here

0 个答案:

没有答案