2012年10月8日

Ajax:动态加载列表框

摘要: <html xmlns="http://www.w3.org/1999/xhtml"><head> <title></title> <script type="text/javascript"> var xmlHttp; function createXMLHttpRequest() { if (window.ActiveXObject) { xmlHttp = new ActiveXObject("Microsoft.XMLHTTp"); } else if... 阅读全文

posted @ 2012-10-08 20:24 lufangtao 阅读(727) 评论(0) 推荐(0) 编辑

Ajax:读取响应首部

摘要: 有时,只是想“ping”一下服务器,验证服务器是否正常运行。此时,只需要读取服务器发出的响应首部,而忽略内容。通过读取响应首部,可以得出content-Type(内容类型)、Content-Length(内容长度)。甚至LastModified(最后一次修改)的日期。<html xmlns="http://www.w3.org/1999/xhtml"><head> <title></title> <script type="text/javascript"> var xmlHttp; var r 阅读全文

posted @ 2012-10-08 19:39 lufangtao 阅读(217) 评论(0) 推荐(0) 编辑

Ajax:数据验证

摘要: <html xmlns="http://www.w3.org/1999/xhtml"><head> <title></title> <script type="text/javascript"> var xmlHttp; function createXMLHttpRequest() { if (window.ActiveXObject) { xmlHttp = new ActiveXObject("Microsoft.XMLHTTp"); } else if... 阅读全文

posted @ 2012-10-08 19:16 lufangtao 阅读(298) 评论(0) 推荐(0) 编辑

Ajax:发送请求与处理响应

摘要: 1.处理服务器响应 XMLHttpRequest对象提供了两个可以用来访问服务器响应的属性。第一个属性responseText将响应提供了一个串,第二个属性responseXML将响应提供了一个XML对象。 1.1 利用innerHTML属性创建动态内容 innerHTML.xml 文件内容如下:<?xml version="1.0" encoding="utf-8" ?><table border="1"> <tbody> <tr> <th>姓名</th> &l 阅读全文

posted @ 2012-10-08 10:50 lufangtao 阅读(5808) 评论(0) 推荐(0) 编辑

导航