getJSON
来源:互联网 发布:2016网络流行语口头禅 编辑:程序博客网 时间:2024/05/16 16:27
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"><html> <head> <title>ajax.html</title> <meta http-equiv="keywords" content="keyword1,keyword2,keyword3"> <meta http-equiv="description" content="this is my page"> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <script type="text/javascript" src="../../js/jquery-1.4.2.js"></script><script type="text/javascript"> $(function(){ $("#JSONbutton").bind("click",function(){$.getJSON("../../page/json/demo.json",function(data){ alert(data);//jquery 对json 的语法格式要求比较严格...alert(data.total);var array=data.rows;alert(array[0].username);alert(array[1].age);alert(array[2].sex);}); }) })</script> </head> <style type="text/css"> </style> <body> <input type="button" id="JSONbutton" value="getjson提交"> </body></html>
demo.json
{ "total":189,"rows":[{"username":"zhangsan"},{"age":18},{"sex":"weizhi"}]}
阅读全文
0 0
- $.getJSON()?
- $.getJSON
- $.getJSON
- getJson
- getjson
- $.getJson
- $.getJSON()
- getJSON
- getJSON
- jQuery.getJSON()
- getJSON 缓存
- jQuery getJson
- $.getJson()方法
- $.getjson()【笔记】
- jquery.getJSON($.getJSON)用法
- jQuery之$.getJSON使用
- jquery getjson简单应用
- jquery json getjson 翻页
- spring mapper注入到service失败的解决方法
- Jenkin邮件设置详解
- JAVA基础学习之线程
- Sqlalchemy 乱码解决方法
- 2017-12-11
- getJSON
- springmvc 关于http400错误的记录
- 【笔记】【微信OCR(2):深度序列学习助力文字识别】
- 求数组中两个字符串的最小距离 Python 版
- C#中字节的转换
- 最通俗易懂的使用OkHttp进行WebSocket连接教程:上来直接撸代码
- 2. ROS的多机通讯的配置
- C++ -- 友元
- 商城项目分解-各页面顶部元素的静态引入及导航条的异步加载