易截截图软件、单文件、免安装、纯绿色、仅160KB

jQuery AJAX的5种实现方式

What is AJAX
This section is for those who have no idea what AJAX is. If you don’t fall into this category, feel free to skip to the next section.
AJAX stands for asynchronous JavaScript and XML. If you see another term XHR, which is shorthand for XML HTTP request, it’s the same thing. Don’t be afraid of this jargon; AJAX is not rocket science.
In Gmail, switch from inbox to draft. Part of the page is changed, but the page is not refreshed. You remain on the same page. Url has not changed (except for the #draft at the end of the url, but that’s still the same webpage).
In Google Reader, select a feed. The content changes, but you are not redirected to another url.
In Google Maps, zoom in or zoom out. The map has changed, but you remain on the same page.
The key to AJAX’s concept is “asynchronous”. This means something happens to the page after it’s loaded. Traditionally, when a page is loaded, the content remains the same until the user leaves the page. With AJAX, JavaScript grabs new content from the server and makes changes to the current page. This all happena within the lifetime of the page, no refresh or redirection is needed.
Caching AJAX
Now we should know what AJAX actually is. And we know that, when Gmail refreshes some content without redirection, an AJAX call is made behind the scenes. The requested content can either be static (remains exactly the same all the time, such as a contact form or a picture) or dynamic (requests to the same url get different responses, such as Gmail’s inbox where new mails may show up any time).
For static content, we may want the response cached. But for dynamic content, which can change in a second’s time, caching AJAX becomes a bug, right? It should be noted that Internet Explorer always caches AJAX calls, while other browsers behave differently. So we’d better tell the browser explicitly whether or not AJAX should be cached. With jQuery, we can


相关文档:

【旧文】AJAX总结(二)

四、DOM
1.DOM概述
XHR对象提供了跟服务器通讯的能力,而DOM提供了访问、动态更新页面的能力。
DOM是W3C推出的文档对象模型,是表示文档和访问、操作构成文档的各种元素的API,被定义为独立于语言的标准,在javascript和java以及其他语言中都有实现。
在DOM中,HTML文档的层次机构被表示为树形结构,树的节点表示文档中 ......

Ajax中的XMLHttp请求

Ajax中的XMLHttp请求
 
 
         当Microsoft开始在Internet Explorer 5.0中引入对XML基本的支持时,也引入了一个称为MSXML的ActiveX库,此库中的一个对象很快便成为广为人知的——XMLHttp。
         XML ......

ASP.Net网站开发ajax局部刷新问题

这几天在写一个页面,页面内容全是局部刷新,最近看到了Ajax控件,觉得很新鲜,于是就用控件开发,遇到的问题是在太多.
头都搞晕了 ,以后不用了 .推荐还是使用WebServices的好.
1.已成功与服务器建立连接,但是在登录过程中发生错误。 (provider: 共享内存提供程序, error: 0 - 管道的另一端上无任何进程。)
此错误我在网上找 ......

ajax 缓存

1、在服务端加 header("Cache-Control: no-cache, must-revalidate");
  2、在ajax发送请求前加上 xmlHttpRequest.setRequestHeader("If-Modified-Since","0");
  3、在ajax发送请求前加上 xmlHttpRequest.setRequestHeader("Cache-Control","no-cache");
  4、在 Ajax 的 URL 参数后加上 "?fresh=" + Math.rando ......

由ajax引发的this.Title的改变

最近被这个问题困惑了一段时间
问题的由来是这样的:
在pageload事件中,有一行语句对this.Title赋值: this.Title = dir.name;
由dir的name去动态的生成网页的title
这么做并没有什么问题,但是一旦结合了ajax,问题就出现了
有兴趣的朋友可以尝试一下
在pageload中对this.Title赋值,然后在body中写一个updatepanel ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号