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

简单的AJAX手工范例

Client端
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
 <head>
  <script language="javascript">
  var XmlHttp=new ActiveXObject("Microsoft.XMLhttp");
  
  function sendAJAX()
  {
   XmlHttp.Open("POST","Server.aspx",true);
   XmlHttp.send(null);
   XmlHttp.onreadystatechange=ServerProcess;
  }
  
  function ServerProcess()
  {
   if (XmlHttp.readystate==4 || XmlHttp.readystate=='complete')
   {
    document.getElementById('nameList').innerHTML =XmlHttp.responsetext;
   }
  }
  
  setInterval('sendAJAX()',1000);
  
  </script>
 </head>
 <body>
  <div id="nameList"></div>
 </body>
</html>
另建一页面Server.aspx,Server端
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Diagnostics;
public partial class Server : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        PerformanceCounter myMemory = new PerformanceCounter();
        myMemory.CategoryName = "Memory";
        myMemory.CounterName = "Available KBytes";
        string txtResult = "-->服务器可用内存大小:" + myMemory.NextValue().ToString();
        Response.Write(DateTime.Now.ToLongTimeString() + txtResult);
    }
}
Syst


相关文档:

AJAX笔记

jsp内置对象:
 page  --java.lang.Object
 request  --javax.servlet.http.HttpServletRequest
 session  --javax.servlet.http.HttpSession
 application --javax.servlet.ServletContext
 
 response --javax.servlet.http.HttpServletRes ......

Ajax读书笔记

1.记住下面三句话:
   <1>异步应用程序是用JavaScriptt对象作出请求,而不是提交表单
   <2>请求与响应是由Web浏览器处理,而不是直接由JavaScript代码处理
   <3>一旦Web浏览器得到异步请求的响应,它会以服务器的响应“回头调用”JavaScript代码(这 ......

PHP教程:AJAX 应用WEB开发

AJAX无疑是2005年炒的最热的Web开发技术之一,当然,这个功劳离不开Google。我只是一个普通开发者,使用AJAX的地方不是特别多,我就简单的把我使用的心得说一下。(本文假设用户已经具有JavaScript、HTML、CSS等基本的Web开发能力)
  [AJAX介绍]
  Ajax是使用客户端脚本与Web服务器交换数据的Web应用开发方法。Web页 ......

php ajax 表格排序,调整列宽,修改内容


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<link rel="stylesheet" type="text/css" media="all" href="css/style.css" />
<meta http-equiv="Content-Type" content="text/html; ......

JQuery的ajax实例

<html>
<head>
<title>jQuery Ajax 实例演示</title>
</head>
<script language="javascript" src="../lib/jquery.js"></script>
<script language="javascript">
$(document).ready(function ()
{
   $('#send_ajax').click(function (){
   ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号