Çó½ÌjQueryµÄAjaxʼþÈçºÎÌí¼Ó
ÎÒ¿´Á˺ܶàÕâ·½ÃæµÄ°ïÖúÎĵµ£¬µ«ÊÇʼÖÕûÓÐÌí¼Ó³É¹¦£¬Ï£Íû¸ßÊÖÄܰïÎҰѼ¸¸öAjaxʼþ¼Óµ½ÏÂÃæµÄ´úÂëÀïÃæÈ¥£¬
Ï£ÍûÄܰÑÈ«¾ÖʼþºÍ¾Ö²¿Ê¼þ¶¼¼Ó½øÈ¥¡£
HTML code:
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>ÎÞ±êÌâÒ³</title>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript">
$.ajax({
beforeSend:function(){$("#loading").show();},
complete:function(){$("#loading").hide();}
});
// $("#loading").beforeSend(function(e,xhr,o) {
// alert("asdf");
// //this.innerHTML="<div style='border:1px solid red'>¿ªÊ¼Ç°</div>";
// });
</script>
</head>
<body>
<form id="form1" runat="server">
<div id="loading" style="display:none">¿ªÊ¼Ç°</div>
<div style="border:1px solid blue" id="mess_div">
<script type="text/javascript">
$.post("./test.aspx",{Action:"post",aa:"post·½Ê½"},
function(data,textStatus){
mess_div.innerText=data;
},"html"
)
</script>
Ïà¹ØÎÊ´ð£º
ajax µÄÁ÷³ÌÊÇʲô
ÆÚ´ýѧϰ¡£¡£¡£
¿Í»§¶Ë²Ù×÷
Ò³Ãæ·¢³ö·þÎñÆ÷¶ËÇëÇó
µÃµ½ÇëÇó
¸üв¿·ÖÒ³Ãæ
»ù±¾Á÷³ÌÖªµÀ¸ÅÄîûÓ㬻¹ÊÇ×Ô¼ºÐ´¸öÀí½âµÃ¸üÉî¿Ì£¬ºÜ¼òµ¥µÄ¡£
ÎÒÒ²ºÜºÃÆæ£¬AjaxÈçºÎÓÃJavaScriptºÍXMLʵÏÖ ......
ÀûÓÃAjax´«µÝÒ»¸ö²ÎÊýµ½getreslt.asp£¬µ«ÊÇ·¢ÏÖgetreslt.aspÓ¦¸ÃÊÇûÄÜ»ñÈ¡µ½£¬¼ì²éÁË·¢ËͲ¿·Ö£¬Ó¦¸ÃÊÇ·¢³öÈ¥Á˵쬵±Ö¸¶¨getreslt.aspµÄ²éѯÌõ¼þ£¬Ò²Äܵõ½responseµÄ½á¹û¡£Âé·³¸÷λ¿´¿´£¬Õâ¸öÊÇ·¢ËͲ¿·ÖÓÐÎÊÌ⻹ÊÇ ......
ÔõÑùѧϰAjaxЧÂʸü¸ß£¿×î½ü¿ªÊ¼½Ó´¥ÕâÏî¼¼Êõ£¬µ«×ÜÊǸоõÄÚÈÝ·±Ëö£¬²»ÈÝÒ×Àí½â£¬Ïà¹ØµÄ½Å±¾¿ª·¢Ò²¾õµÃÄѶȴ󣬴ó¼ÒÓÐûÓйØÓÚѧϰAjaxµÄºÃÊ飬Âé·³¸øÍƼöһЩ£¬Ð»Ð»ÁË~~~
дÓöµ½ÎÊÌâ²é×ÊÁÏ£¬½â¾öÎÊÌ⣬²ÅÓг¤½ø° ......
RT£¡
xmlHttpRequest.send("Ìá½»²ÎÊýÃû=Öµ&Ìá½»²ÎÊýÃû1=Öµ");
var date={"Êý¾Ý1":"Êý¾Ý1Öµ","Êý¾Ý2":"Êý¾Ý2Öµ","Êý¾Ý3":"Êý¾Ý3Öµ" ......
JScript code:
function upnum(h_id){
var url = "InfoOnOff.asp?ID="+ h_id
var ajax = InitAjax();
ajax.open("GET", url, true);
ajax.onreadystatechange = function() {
if (ajax ......