Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

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>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>ÎÞ±êÌâÎĵµ </title>
<script language="javascript">
var xmlHttpRequest;
function createXMLHttpRequest()
{

if(window.ActiveXObject)
{
                  return new ActiveXObject("Microsoft.XMLHTTP");
}else
{
    return new XMLHttpRequest();
}
}


function checkUserName(){

createXMLHttpRequest();

        xmlHttpRequest.open("GET","1.aspx",true);
        alert("dddd");
xmlHttpRequest.onreadystatechange=function()
{
  if(xmlHttpRequest.readyState == 4 && xmlHttpRequest.status==200)///status--%>
            alert("·þÎñÆ÷·µ»Ø"+xmlHttpRequest.responseText);
          }
xmlHttpRequest.send(null);
}


</script>
</head>



Ïà¹ØÎÊ´ð£º

ASP.NETÀïµÄÒ»¸öAJAXµÄ´íÎó


ÎÒµÄÒ³ÃæÀïÓõÄAJAX¿Ø¼þ µ«Ò³Ãæ¾²Ö¹Ò»¶Îʱ¼ä¾Í»á³öÏÖÉÏÃæµÄÒ»¸ö´íÎóÊÇÔõô»áÊÂѽ Ôõô½â¾ö°¡
¸ßÊÖ°ï°ïæ°¡

½«ÏîÄ¿Éϼ¶Ä¿Â¼ÖеÄÖÐÎÄÃû³ÆÈ«²¿¸Ä³ÉÓ¢ÎÄ

Â¥ÉÏ˵µÄºÜÇå³þÁË¡£°ï¶¥Ò»Ï°É

Õâ¸öÎÊÌâ²»ÊǺܳ£ ......

AjaxÖлص÷º¯ÊýµÄ´¦Àí½á¹ûûÓзµ»Ø£¿

JScript code:

function callback() {
alert(18); //²âÊÔÊÇ·ñµ÷ÓÃÁËcallback»Øµ÷º¯Êý
if (httpRequest.readyState==4) {
if(httpRequest.status==200){
alert(3); //²âÊÔÊ ......

ajax³¬Ê±ÎÊÌâ

var xmlHttp = null;
function Getxmlhttp()
{
var url = "update.php";

if (xmlHttp == null)
{
xmlHttp=GetXmlHttpObject();
  if (xmlHttp==null)
  &n ......

AJAXÎÊÌ⣡£¡

Ò»¸öButton
Ò»¸öModalPopupExtender
Ò»¸öPanel

ÎÊÌâÊÇÕâÑùµÄ£ºÔÚ×öÐÞ¸Äʱºò µ±µãÐÞ¸ÄButton Panel ÏÔʾÁËÒ²ÓÐÒõӰЧ¹û£»
µ«ÊÇÎÒÐÞ¸ÄButtonÓÐbtn_Update_Clickʼþ£¬ÕâʼþÊǰó¶¨Êý¾ÝµÄ£»
ÏÖÔÚµÄÐ ......

¼±Ñ½£¬Çë½Ì£¡£¡£¡ ajaxÎÊÌâ

function checkCallBack(){

  if(xmlHttp.readyState==4){
      if(xmlHttp.status==200){
        var result = xmlHttp.responseText;
    ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ