易截截图软件、单文件、免安装、纯绿色、仅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入门教程

原文地址:http://hi.baidu.com/zhangqiuxi/blog/item/3d0206a84bbd72bbcb130cab.html
这篇文章说明 AJAX 相关技术的基础,并提供实例供您上手。
第一步 – 说声「请」 (又称为「怎么发出 XMLHttpRequest」)
为 了用 JavaScript 对服务器发送 HTTP 要求,你必须先以相关的类别(class)制出实体(instance)。Int ......

一个关于javascript Ajax解析XML的原始实例

        该实例首先需要创建数据库,数据库Test唯一表test,该表具有三个列分别为c1,c2,c3, int型,请自行建立数据库并插入几行测试数据。
        然后我们希望能将数据库中的数据读取出来,我在此处只是将数据库数据以数据集的方式存放在本地中, ......

Ajax实现三级联动下拉框

jsp的代码:
<%
@ page contentType 
=
 
"
text/html; charset=GBK
"
  
import
=
"
java.util.*,com.wehave.hyerp.procurement.domain.Cgsqd
"
%>
<%
@ taglib uri
=
"
struts-html
"
 prefix
=
" ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号