anyone can help to check my failed jquery ajax jsonp example? -


my example code hosts here:

<html>    <head>        <title>untitled page</title>        <script type="text/javascript" src="/jquery.min.js"></script>        <script type="text/javascript">            jquery(document).ready(function(){                $.ajax({                    type: "get",                     url: "http://your-ser.com/reports.json",                datatype: "jsonp",                   jsonp: "callback",           jsonpcallback: "haha",                 success: function(json){                     alert('------'+json.name);                        },                   error: function(){                      alert('fail');                        }            });      });      </script>    </head> <body> </body> </html> 

the server end json looks like:

{"name": "peter","age": "100","id":"001"} 

jquery v2.1.3, tried chrome 43/firefox, got "fail" alert, can check reason?


Comments

Popular posts from this blog

angularjs - ADAL JS Angular- WebAPI add a new role claim to the token -

php - CakePHP HttpSockets send array of paramms -

node.js - Using Node without global install -