神坑1:返回的内容必须是正规的json数据。如

{
  "firstName": "Bill",
  "lastName": "Gates",

}

神坑2:这个$.getJSON和AJAX中的jsonp不是一个概念。$.getJSON就是单纯的将返回的内容序列化仅此而已。真正的jsonp请参照以下文章:

http://www.cnblogs.com/CyLee/p/5381578.html



随机推荐

  1. python数学运算的类型转换

    类型转换 Rational类实现了有理数运算,但是,如果要把结果转为 int 或 float 怎么办? 考察整数和浮点数的转换: >>> int(12.34) 12 >> ...

  2. C#的Enum——枚举

    枚举 枚举类型声明为一组相关的符号常数定义了一个类型名称.枚举用于“多项选择”场合,就是程序运行时从编译时已经设定的固定数目的“选择”中做出决定. 枚举类型(也称为枚举)为定义一组可以赋给变量的命名整 ...

  3. 《DSP using MATLAB》示例Example5.1

    终于看到第5章了,继续努力,加油!!! 代码: xn = [0, 1, 2, 3]; N =4; Xk = dfs(xn,N) 用到的dfs函数: function [Xk] = dfs(xn,N) ...

  4. 使用Spring发送邮件

    http://www.oschina.net/code/snippet_253813_36503

  5. Codeforces Round #337 (Div. 2)

    水 A - Pasha and Stick #include <bits/stdc++.h> using namespace std; typedef long long ll; cons ...

  6. Dependency Injection in ASP.NET Core

    Transient – A new instance of the service is created each time it is requested. It can be used for s ...

  7. .net平台下C#socket通信(中)

    上篇.net平台下C#socket通信(上)介绍了socket通信的基本原理及最基本的通信方式.本文在此基础上就socket通信时经常遇到的问题做一个简单总结,都是项目中的一些小问题,拿来此处便于下次 ...

  8. HDU2191(多重背包)

    #include <cstdio> #include <cstring> #include <algorithm> #include <iostream> ...

  9. ural 1073. Square Country

    1073. Square Country Time limit: 1.0 secondMemory limit: 64 MB There live square people in a square ...

  10. [转]CentOS下安装伪分布式Hadoop-1.2.1

    From: http://blog.csdn.net/yinan9/article/details/16805275 环境:CentOS 5.10(虚拟机下) [root@localhost hado ...