дһ¸öajax funciton
function Ajax(url)
{
var m_xmlReq=null;
if(window.ActiveXObject)
{
try
{
m_xmlReq = new ActiveXObject('Msxml2.XMLHTTP');
}
catch(e)
{
try{m_xmlReq = new ActiveXObject('Microsoft.XMLHTTP');}catch(e){}
}
}
else if(window.XMLHttpRequest)
{
m_xmlReq = new XMLHttpRequest();
}
this.post=function(d)
{
if(!m_xmlReq) return;
m_xmlReq.open('POST',url,false);
m_xmlReq.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded;charset=utf-8');
m_xmlReq.send(d);
return eval(m_xmlReq.responseText);
}
}
Ïà¹ØÎĵµ£º
´Ë·½·¨ÓÃjspÄÚÖöÔÏóoutÊä³öµ½xmlÎļþÖÐ
public void ajaxEditorList() throws IOException{
HttpServletResponse response = ServletActionContext.getResponse();
//System.out.println("ddddddddddddddddddddddd;;;");
int unitid=Integer.parseInt(request.getParameter("unit ......
1.XMLHttpRequest¶ÔÏó
open("method","URL""[,asyncFlag[,"userName"[, "password"]]])
½¨Á¢¶Ô·þÎñÆ÷µÄ·ÃÎÊ¡£ÆäÖÐmethod²ÎÊý¿ÉÒÔʹÓÃGET¡¢POST¼°PUT£¬URL²ÎÊý¼È¿ÉÒÔʹÓþø¶ÔµØÖ·£¬Ò²¿ÉÒÔʹÓÃÏà¶ÔµØÖ·£¬´ËÍ⻹°üÀ¨Ó뽨Á¢Á¬½ÓÏà¹ØµÄÈý¸ö²ÎÊý
&nbs ......
Ò».AjaxProµÄʹÓÃ
1.ÔÚÏîÄ¿ÖÐÌí¼ÓÒýÓã¬ä¯ÀÀÕÒµ½AjaxPro.2.dllÎļþ
2.ÔÚWeb.configÖеÄsystem.webÀïÃæдÈëÒÔÏ´úÂë
</configuration>
<system.web>
<httpHandlers>
<add verb="*" path="*.ashx" type="AjaxPro.AjaxHandlerFactory,AjaxPro.2"/>
</httpHandlers>
</system.web> ......
¸½springÕûºÏDWR(°üº¬struts1,spring,hibernateÕûºÏÖÃ):
http://blog.csdn.net/jiabeis/archive/2010/05/26/5626121.aspx
×î½üÁ˽âÁËÒ»¸öÓÐÓõÄAJAX¹¤¾ß£¬¿´ÁËÍøÉϵÄÎÄÕÂÕâÀïÓÐһЩժ³ºÍ×Ô¼ºµÄ×ܽᣬºÍ´ó¼Ò·ÖÏí£º
ʲôÊÇDWR(Direct Web Remote)£¿
DWRÊÇÒ»ÖÖAJAX½â¾ö·½°¸£¡
DWR°üÀ¨Ò»¸öjava¿â£¬ÒÔ¼°Ò»Ì×javascript£¬Ê¹ ......
ASP.NET,AJAXÎļþÉÏ´«µÄÒÉÎÊ
Ô±¾ÒÔΪÓÃÕâÖÖ·½Ê½£¬°Ñ´Ë·½·¨·Åµ½Ò»¸öHttphandlerÖУ¬È»ºó´ÓJAVASCRIPT·ÃÎÊHttphandlerÀ´ÊµÏÖÎÞˢеÄÎļþÉÏ´«¡£Ã»Ïëµ½£¬ÕâÑùͬÑùÊDz»Ðеģ¬Ö»ÄÜÔÚ±¾»ú²âÊÔͨ¹ý£¬Èç¹û·Åµ½ÍøÉÏ£¬»òÕß´ÓÆäËûµØ·½·ÃÎʾͻáÌáʾÎÞ·¨ÕÒµ½Îļþ£¬¿É¼ûÔÚASP.NETÖÐËüÖ»ÄÜÓÃÓÚÉÏ´«·þÎñÆ÷¶ËµÄÎļþ¡£
֮ǰÔÚÍøÕ¾Ò²Ë ......