PHP编程实战15-14/15

前端







    Loading JSON with jQuery
    
    


Ajax parsed XML:

服务器端json_example.php返回json字符串

 array("gorilla", "giraffe", "elephant"),
    "asia" => array("panda"),
    "north america" => array("grizzly bear", "lynx", "orca"),
);
print json_encode($animals);
?>

重点

  • 请求资源文件在PHP编程实战15-14
  • $.each方法规定为每个匹配元素规定运行的函数。
    提示:返回 false 可用于及早停止循环。
    语法:$(selector).each(function(index,element))
  • $.getJSON这里虽然请求的是json_example.php这样的php文件,但返回结果是json字符串.php只是一个标记生成器.
    $.getJSON
    $.each

问题
js不同函数回调函数的几种形式是在哪里定义好的?

你可能感兴趣的:(PHP编程实战15-14/15)