ajax»º´æÎÊÌâ½â¾ö;¾¶
ÎÒÓÃPHPºÍAjax½áºÏ£¬Ìí¼ÓÊý¾ÝÖ®ºó£¬Ë¢ÐÂǰ̨ҳÃ棬Êý¾ÝûÓб仯¡£
ÎҸĶ¯PHP¶¯Ì¬½Å±¾£¬Ö»ÓÐÖØÐÂÕÒ¿ªIEÔÙÊäÈëµØÖ·£¬²ÅÄÜ¿´µ½Ð§¹û¡£
ÒÔÉÏÕâЩÊDz»ÊÇ»º´æµÄÔÒò°¡£¿Ôõô½â¾ö£¿
ajax»º´æÎÊÌâ½â¾ö;¾¶£º
ÊÇ»º´æµÄÎÊÌâ¡£
ÔÚ·þÎñ¶Ë¼Ó header("Cache-Control: no-cache, must-revalidate");
²¢ÇÒÔÚÄãµÄJSÌá½»²ÎÊýÖмÓËæ»ú»òÊÇʱ¼ä×Ö·û´®
url+"?timeStamp="+new Date().getTime();
Ïà¹ØÎĵµ£º
jquery Ajax ´«µÝºº×Öµ½ servlet ʱ³öÏÖÂÒÂëµÄÎÊÌâ
2009Äê11ÔÂ25ÈÕ ÐÇÆÚÈý ÏÂÎç 02:28
jquery Ajax ´«µÝºº×Öµ½ servlet ʱ³öÏÖÂÒÂëµÄÎÊÌâ
ÔÚjsÖжÔÐèÒªµÄ´«Ë͵IJÎÊý½øÐбàÂë
encodeURI(encodeURI(param))
ÔÚ·þÎñÆ÷½ÓÊܺó¶ÔÆä½øÐнâÂë
String param = URLDecoder.decode(request.getParameter("param"),"utf-8");
......
AJAX ÔÚä¯ÀÀÆ÷Óë Web ·þÎñÆ÷Ö®¼äʹÓÃÒì²½Êý¾Ý´«Ê䣨HTTP ÇëÇ󣩣¬ÕâÑù¾Í¿ÉʹÍøÒ³´Ó·þÎñÆ÷ÇëÇóÉÙÁ¿µÄÐÅÏ¢£¬¶ø²»ÊÇÕû¸öÒ³Ãæ¡£
AJAX »ùÓÚ Web ±ê×¼
AJAX »ùÓÚÏÂÁÐ Web ±ê×¼£º
JavaScript
XML
HTML
CSS
ÔÚ AJAX ÖÐʹÓÃµÄ Web ±ê×¼Òѱ»Á¼ºÃ¶¨Ò壬²¢±»ËùÓеÄÖ÷Á÷ä¯ÀÀÆ÷Ö§³Ö¡£AJAX Ó¦ÓóÌÐò¶ÀÁ¢ÓÚä¯ÀÀÆ÷ºÍƽ̨¡£
Deafault. ......
¹ØÓÚajaxµÄÃû×Ö
ajax µÄÈ«³ÆÊÇAsynchronous JavaScript and XML£¬ÆäÖУ¬Asynchronous ÊÇÒì²½µÄÒâ˼£¬ËüÓбðÓÚ´«Í³web¿ª·¢ÖвÉÓõÄͬ²½µÄ·½Ê½¡£
¹ØÓÚͬ²½ºÍÒì²½
Òì²½´«ÊäÊÇÃæÏò×Ö·ûµÄ´«Ê䣬ËüµÄµ¥Î»ÊÇ×Ö·û£»¶øͬ²½´«ÊäÊÇÃæÏò±ÈÌصĴ«Ê䣬ËüµÄµ¥Î»ÊÇè壬Ëü´«ÊäµÄʱºòÒªÇó½ÓÊÜ·½ºÍ·¢ËÍ·½µÄʱÖÓÊ ......
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 ......
±ÈÈçÒª¸øÓû§±¨¸æÒ»¸ö´íÎó£¬ÓÃÏÂÃæµÄ·½·¨£º
ʹÓÃset_error_handlerÉèÖÃ×Ô¼ºµÄ´íÎó´¦Àíº¯Êý£¬ÔÚ±¨´íµÄµØ·½Ê¹ÓÃtrigger_error£¬ÔÚ×Ô¶¨ÒåµÄ´íÎó´¦Àíº¯ÊýÖиøÓû§ÏÔʾһ¸ö³ö´íÐÅÏ¢Ò³Ãæ¡£
µ«
ÊÇÈç¹ûµ÷ÓÃtrigger_errorµÄÕâ¸öÒ³ÃæÊDZ»Ò»´ÎajaxÇëÇó´¥·¢µÄ£¬ÄÇôajax·µ»Øºó½«µÃµ½Ò»´ó¶ÑÓÃÓÚÏÔʾ´íÎóµÄhtml´úÂë¡£¶øÒ»°ã
ajaxµ÷Óö ......