首页 > 代码库 > AJAX

AJAX

XMLHttpRequest和ActiveXObject的区别

XMLHttpRequest和ActiveXObject学习 

XMLHttpRequest 对象


ajax请求页  

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title></title>
    <script src=http://www.mamicode.com/"js/jquery-1.10.2.min.js" type="text/javascript"></script>>


服务器页

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace AJAX
{
    /// <summary>
    /// Handler1 的摘要说明
    /// </summary>
    public class Handler1 : IHttpHandler
    {
        /// <summary>
        /// 在页面输出当前时间
        /// </summary>
        /// <param name="context"></param>
        public void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType = "text/html";
            //context.Response.Write("Hello World");
            context.Response.Write(DateTime.Now);
        }

        public bool IsReusable
        {
            get
            {
                return false;
            }
        }
    }
}


AJAX