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

ÇëÎÊÒ»¸ö×î»ù±¾µÄajaxµÄÑéÖ¤ÎÊÌâ

var xmlHttp = false;
try{
  xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");
    }
catch (e){
try{
    xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
  }
catch (e2)
{
    xmlHttp = false;
  }
}
if (!xmlHttp && typeof XMLHttpRequest != 'undefined'){
  xmlHttp = new XMLHttpRequest();
}
function callServer(){
  var u_name = document.getElementById("TextBox1").value;
  if ((u_name == null) || (u_name == "")) return;
  var url = "Validate.aspx?UserName=" + escape(u_name);
  xmlHttp.open("GET", url, true);
  xmlHttp.onreadystatechange = updatePage;
  xmlHttp.send(null); 
}
function updatePage(){
  if (xmlHttp.readyState < 4){
test1.innerHTML="loading...";
  }
  if (xmlHttp.readyState == 4){
    var response = xmlHttp.responseText;
test1.innerHTML=response;
  }
}


string nam = Request.QueryString["UserName"].ToString();
        if(nam=="1")
        {
            Response.Write("´ËÓû§ÃûÒѾ­±»×¢²á"); <


Ïà¹ØÎÊ´ð£º

ajaxµÄAsyncPostBackTriggerûЧ¹û

            <div id="div6" runat="server" style= "height:auto;width:auto; text-align: left;">
          & ......

Hibernate+spting+struts+ajax ÕûºÏÎÊÌâ

´ó¼ÒºÃ£¬Çë¸ßÊÖÃÇÖ¸µã
ÎÒµÄservletÎļþÊÇ£º
package com.ljc.rank.ajax;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
......

struts2 Ò³ÃæÉÏ ajax responseText ·µ»Ø¿Õ

JScript code:

var xmlhttp=new ActiveXObject("Microsoft.XMLHTTP")


function ajaxTest() {

var starttime = document.getElementById(&q ......

net2.0 AjaxʵÏÖÒ³Ãæ¾Ö²¿Ë¢ÐÂ

Ö÷Ò³ÖÐÓиöÄ£¿é£¨µ÷ÓÃĸ°æÒ³£©ÓÐÒ»¸öDropDownlist ºÍÒ»¸öLabel¿Ø¼þ£¬ÒªÇóÑ¡ÔñDropDownlistÖеÄÏîʱ °ÑÊý¾Ý¿âÖÐÏàÓ¦µÄÄÚÈÝÏÔʾµ½LabelÉÏ ¶ø²»Ë¢ÐÂÕû¸öÒ³Ãæ¡£
֮ǰû¶ÔAjaxÓÐÈκÎÁ˽⣬²»ÖªµÀÈçºÎʵÏÖ¾Ö²¿Ë¢Ð¡£ÏÖÔ ......

ajax×öµÄ·ÀÖ¹×¢²áÓû§ÃûÏàͬ£¿£¿£¿´«ÖÐÎÄÖµ

ajax×öµÄ·ÀÖ¹×¢²áÓû§ÃûÏàͬ£¿£¿£¿´«ÖÐÎÄÖµ
Ö±½ÓÓÿò¼Ü¾ÍºÜ¼òµ¥ÁË¡£ÀýÈçjsonÖ®ÀàµÄ¡£

Èç¹ûÊÇ×Ô¼ºÐ´£¬×îºÃ°ÑÖÐÎĽøÐÐÒ»ÏÂת»»£¬È»ºóÔÚºǫ́ÔÙת»»»ØÀ´¡£ÕâÑù±È½Ï±£ÏÕ¡£

ÓÃDWR°É

Â¥Ö÷ÖØµãÊÇ¡°ajax×öµÄ·ÀÖ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ