2013年9月21日

摘要: 这是一个Ajax函数的缩写,这相当于:123456$.ajax({ dataType: "json", url: url, data: data, success: success});数据会被附加到一个查询字符串的URL中,发送到服务器。如果该值的data参数是一个普通的对象,它会转换为一个字符串并使用URL编码,然后才追加到URL中。大多数情况下都会指定一个请求成功后的回调函数:123456789101112$.getJSON('ajax/test.json', function(data) { var items = []; $.each(data, 阅读全文
posted @ 2013-09-21 17:15 孟子hehe 阅读(248) 评论(0) 推荐(0) 编辑
 
摘要: html代码如下: 响应页面JQueryAJAX.aspx后台代码: protected void Page_Load(object sender, EventArgs e) { Response.Write("呵呵!测试成功啦!"); } 阅读全文
posted @ 2013-09-21 16:55 孟子hehe 阅读(208) 评论(0) 推荐(0) 编辑
 
摘要: function UpdateInit(opt){ this.init(opt);}UpdateInit.prototype={ loadUrl:null, loadParam:null, beforeLoad:null, afterLoad:null, beforeInit:null, afterInit:null, customInit:null, init:function(opt){ this.loadUrl=opt.loadUrl; this.loadParam=opt.loadParam; this.beforeLoad=opt.afterLoad; ... 阅读全文
posted @ 2013-09-21 10:38 孟子hehe 阅读(328) 评论(0) 推荐(0) 编辑
 
摘要: 本文基于jQuery1.7.1版本,是对官方API的整理和总结,完整的官方API见http://api.jquery.com/browser/0、总述jQuery框架提供了很多方法,但大致上可以分为3大类:获取jQuery对象的方法、在jQuery对象间跳转的方法,以及获取jQuery对象后调用的方法其中第一步是怎样获取jQuery对象。大致来说,是通过最核心的$()方法,将页面上的元素(或者在页面上不存在的html片段)包装成jQuery对象。$()方法里面支持的语法又包括3大类,分别是表达式(包括类表达式.,id表达式#,元素表达式等)、符号(包括后代符号space,next符号+等)、过 阅读全文
posted @ 2013-09-21 08:48 孟子hehe 阅读(270) 评论(0) 推荐(0) 编辑