摘要: 以下代码是经过本人大量实验,结合他人资料总结出来一段ajax核心代码,比较灵活,传参可以用POST和GET,可以返回TEXT和XML <scriptlanguage="javascript"> //JavaScriptDocument varhttp_request=false; //发送请求,第一个参数为目的地址,第二个参数为请求方法只有"GET"、"POST" //第三个参数为需要传送的参数列表key1=value1&key2=value2 //第四个参数为响应信息类型只能为"TEXT"或& 阅读全文
posted @ 2011-03-07 14:04 Atlas's blog 阅读(187) 评论(0) 推荐(0) 编辑
摘要: 在《Pragmatic AjaxA Web 2.0 Primer 》中偶然看到对readyStae状态的介绍,感觉这个介绍很实在,摘译如下:0: (Uninitialized) the send( ) method has not yet been invoked.1: (Loading) the send( ) method has been invoked, request inprogress.2: (Loaded) the send( ) method has completed, entire responsereceived.3: (Interactive) the respons 阅读全文
posted @ 2011-03-07 14:03 Atlas's blog 阅读(7333) 评论(0) 推荐(2) 编辑