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

ajax´´½¨¶ÔÏó

function createXMLHttpRequest(){     
if(window.ActiveXObject){     
        http = new ActiveXObject("Microsoft.XMLHTTP");     
        }else if(window.XMLHttpRequest){     
                http=new  XMLHttpRequest();
        }
}
function send(){
        createXMLHttpRequest()
        url="b.asp";//µ÷ÓÃÒ³Ãæ!
        http.open("POST",url,true);//²ÉÓÃPOST·½Ê½£¬Í¬²½·½Ê½·¢ËÍ
        http.setRequestHeader('Content-type','application/x-www-form-urlencoded');  
        http.onreadystatechange=loadings
        http.send(null);//¹¹ÔìÒ»¸öXML¶ÔÏó²¢·¢ËÍ
}
function  loadings(){     
        if(http.readyState==4){
                if(http.status==200){
                        alert("¼ÓÔØÍê³É")//Õâ¸öµØ·½²»ÖªµÀÔõôȥ»ñµÃb.aspµÄÐÅÏ¢,»ñÈ¡²»µ½
                               // alert(http.responseText);//ÕâÑùºÃÏóÒ³Ãæ´ò³öÀ´Ã»Ê²Ã´Óô¦ÒòΪȫÊÇhtml´úÂë/
                                }else{
                        alert("¼ÓÔØʧ°Ü")
                }
        }
}


Ïà¹ØÎĵµ£º

AjaxÈëÃÅÍƼö

¶ÔÏëѧAjaxµÄÐÂÈË£¬Ç¿ÁÒÍƼöÒ»ÏÂÎÄÕ£º¡¶ÕÆÎÕ Ajax ϵÁС·     http://www.ibm.com/developerworks/cn/web/wa-ajaxintro/
¸ÃϵÁУ¬²»ÏñÄÇЩͷʹҽͷ½ÅÍ´Ò½½ÅµÄËÙʳÅÉ£¬ßëßë߶߶˵ÁË°ëÌ춼¾õµÃû˵µ½µã×ÓÉÏ£¬¸ÃϵÁÐÎÄÕÂÉîÈëdz³öµÄ½éÉÜÁËһЩºÜ»ù±¾µÄ֪ʶ£¬µÀ³öÁËһЩ·Ç³£±¾ÖʵÄÄںˣ¬¾ÍËãÄãÊÇAjaxÀÏÊÖ£ ......

AjaxÖÐÇëÇó±»»º´æµÄÎÊÌâ

½ñÌì¸ãÁËÎÒÈýËĸöСʱµÄÎÊÌ⣬ÖÕÓÚÕÒµ½½â¾ö·½°¸ÁË¡£¹þ¹þ¡£
ÔÚAjax¿ª·¢ÖУ¬»áÓöµ½ä¯ÀÀÆ÷»º´æÄÚÈݵÄÎÊÌ⣬±ÈÈ磬ij¸öÔªËØ×¢²áÁËÊó±êʼþ£¨onmouseover£©£¬Ê¼þ´¥·¢ºó»áͨ¹ýxmlhttprequestµ½·þÎñÆ÷»ñÈ¡ÄÚÈÝ£¬ÔÚ²»Ë¢ÐÂÒ³ÃæµÄÇé¿öÏ£¬ä¯ÀÀÆ÷»á»º´æµÚÒ»´ÎÇëÇóµÄÄÚÈÝ£¬·þÎñ¶Ë¸üкóä¯ÀÀÆ÷ÈÔÈ»ÏÔʾµÚÒ»´ÎµÄÄÚÈÝ¡£
ͨ³££¬ÕâÖÖÇëÇó¶ ......

Ajax µ¯¶Ô»°³ö¿ò

        ±¾ÎĽ«Ê¹ÓÃAjaxToolkitÖеē PopupControlExtender £¬ DynamicPopulateExtender £¬ DragPanelExtender ”¿Ø¼þÀ´¹¹½¨Ò»¸öµ¯³ö¶Ô»°¿ò£¬¿ÉÒÔʵÏÖµ¯³ö¶Ô»°¿ò£¬¶Ô»°¿ò¿ÉÍ϶¯µÈ¹¦ÄÜ¡£±È½ÏÊʺÏ×öÿÈÕÒ»ÌùµÈЧ¹û
       Ê×ÏȽâÊÍÏ ......

JqueryµÄAJAXʹÓùý³ÌÖеÄÌå»á

<mce:script type="text/javascript"><!--
function login(){
var postURL = "http://localhost:8080/cas/simpleLogin";
var params = {
"loginUrl":$("#loginUrl").val(),
"service":$("#service").val(),
"login":$( ......

jsQuery ajax test

test.html
<!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"
conten ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ