原生用法(注意返回数据的格式)
<script type="text/javascript">
function callbackFunction(result, methodName) {
console.info(result);
console.info(methodName);
}
</script>
<script type="text/javascript" src="http://www.runoob.com/try/ajax/jsonp.php?jsoncallback=callbackFunction"></script>
jquery用法(注意返回数据的格式)
$.getJSON("http://www.runoob.com/try/ajax/jsonp.php?jsoncallback=?", function(data) {
console.info(data);
});