【www.gdgbn.com--js教程】

1<%@ Page language="c#" Codebehind="$FILENAME$.cs" AutoEventWireup="false" Inherits="$INHERITS$" %>
   2
   3
   4
   5
   6 Ajax_exam1
   7
   8
   9
  10
  11
  12 <script language=javascript>
  13
  14 var ajax;
  15 function CreateAJAX()
  16 {
  17 if(window.ActiveXObject)
  18 {
  19 try
  20 {
  21 return new ActiveXObject("Msxml2.XMLHTTP");
  22 }
  23 catch(e)
  24 {
  25 try
  26 {
  27 return new ActiveXObject("Microsoft.XMLHTTP");
  28 }
  29 catch(e2)
  30 {
  31 return null;
  32 }
  33 }
  34 }
  35 else if(window.XMLHttpRequest)
  36 {
  37 return new XMLHttpRequest();
  38 }
  39 else
  40 {
  41 return null;
  42 }
  43 }
  44
  45 function onRcvData()
  46 {
  47 if(ajax.readyState == 4)
  48 {
  49 if(ajax.status == 200)
  50 {
  51 var content = document.getElementById(""content"");
  52 content.innerHTML = ajax.respo

本文来源:http://www.gdgbn.com/wangyezhizuo/14219/