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

100·Ö£¡ajaxÇëÇó´íÎó

C# code:

<script type="text/javascript">
window.onload=function()
{
startRequest('get','../College.ashx','lxyc=2&time='+new Date().getTime()+'',ShowIt,true);


}
var xmlHttp1;
function createXMLRequest()
{
if(window.ActiveXObject)
{
xmlHttp1=new ActiveXObject("Microsoft.XMLHTTP");
}
else if(window.XMLHttpRequest)
{
xmlHttp1=new XMLHttpRequest();
}
else

{
alert("²»ÄÜ´´½¨XMLHttpRequest");
}
}
function startRequest(method,url,pars,callbackfun,cache)
{
// alert(method+url+pars+callbackfun+cache);
if(typeof callbackfun != 'function'){
alert('The CallBackFun is not a function!');
}
if(cache){
pars += "&tmp="+Math.random();
}
createXMLRequest();
xmlHttp1.onreadystatechange = function(){
if(xmlHttp1.readyState==4)
{
if(xmlHttp1.status==200)
{
callbackfun(xmlHttp1);
xmlHttp1.abort();
}
else
{
xmlHttp1.abort();


Ïà¹ØÎÊ´ð£º

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


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

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

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

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

°ïСÃÿ´¿´ajaxÌá½»µ½actionµÄÎÊÌâ

ÎÒÔÚwebRoot£­£¾idc£­£¾report£­£¾report_add.jspÒ³ÃæÖÐÓÃajaxÌá½»µ½action×ÜÊDZ¨Õâ´í
140 ERROR RequestProcessor:664 - Invalid path /idc/report/report/report_distb was requested
ÕÒ²»³öÔ­Òò,ÎÒÓÖÔÚн¨ ......

JQÆæ¹ÖµÄajax·½·¨

Ò»htmlÒ³ÃæÊý¾ÝÈçÏ£º

<ul>
<li>aaa </li>
<li>bbb </li>
<li>ccc </li>
</ul>

ͨ¹ýJQµÄajax·½·¨Ö®ºó£¬µÃµ½µÄ¾¹È»±ä³ÉÁË£º

......

ajax ÇëÇóÓòÃû²»Í¬sessionÎÊÌâ

s.com ÓòÃûÏÂÓÐÒ»Îļþprocess.asp
VBScript code:

Response.Buffer = True
Response.ExpiresAbsolute = Now() - 1
Response.Expires = 0
Response.CacheControl = "no-cache"
Response.Add ......

ajaxºólocation.reload()ÎÞЧ

»Øµ÷º¯ÊýÈçÏ£º
function deleteCallBack(data)
{
if(data=="ɾ³ý³É¹¦")
{
alert(data);
location.reload();
}
else
{
alert(data);
}
}
²»Ìø×ª Ö»ÊÇÏÔʾalertÐÅÏ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ