日期:2014-05-16 浏览次数:20704 次
[ { "name":"11", "age":"22" } ]
<!DOCTYPE HTML> <html> <head> <meta charset="utf-8"> <title>无标题文档</title> <script src="js/jquery-1.6.2.js"></script> <script type="text/javascript"> $().ready(function() { $.getJSON('chat.json',function(data){ alert(data.name); }); }); </script> </head> <body> </body> </html>
// alert(data.name); //=====> alert(data[0].name);