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

¹ØÓÚAjaxä¯ÀÀÆ÷Ö§³ÖµÄ´úÂë

<script type="text/javascript">
function AjaxFunction()
 {
 var xmlHttp;
 
 try
    {
   // Firefox, Opera 8.0+, Safari
    xmlHttp=new XMLHttpRequest();
    }
 catch (e)
    {
  // Internet Explorer
   try
      {
      xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
      }
   catch (e)
      {
      try
         {
         xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
         }
      catch (e)
         {
         alert("ÄúµÄä¯ÀÀÆ÷²»Ö§³ÖAjax£¡");
         return false;
         }
      }
    }
 }
</script>


Ïà¹ØÎĵµ£º

Ajax»ù´¡

1£ºAjax¿ÉÒÔͨ¹ýJavaScriptµÄXMLHttpRequest¶ÔÏóÓë·þÎñÆ÷½øÐÐͨÐÅ£¬Í¨¹ýXMLHttpRequest£¬JavaScript¿ÉÒÔÔÚ²»ÖØÔØÒ³ÃæµÄÇé¿öÏÂÓë·þÎñÆ÷½øÐÐͨÐÅ¡£
 
2£ºXMLHttpRequest ä¯ÀÀÆ÷Ö§³Ö
 
<script type="text/javascript">
function ajaxFunction()
{
var xmlHttp;
try
    {
xmlHtt ......

php¼ì²âajax·½Ê½µÄµ÷ÓÃÇëÇó

±ÈÈçÒª¸øÓû§±¨¸æÒ»¸ö´íÎó£¬ÓÃÏÂÃæµÄ·½·¨£º
ʹÓÃset_error_handlerÉèÖÃ×Ô¼ºµÄ´íÎó´¦Àíº¯Êý£¬ÔÚ±¨´íµÄµØ·½Ê¹ÓÃtrigger_error£¬ÔÚ×Ô¶¨ÒåµÄ´íÎó´¦Àíº¯ÊýÖиøÓû§ÏÔʾһ¸ö³ö´íÐÅÏ¢Ò³Ãæ¡£
µ«
ÊÇÈç¹ûµ÷ÓÃtrigger_errorµÄÕâ¸öÒ³ÃæÊDZ»Ò»´ÎajaxÇëÇó´¥·¢µÄ£¬ÄÇôajax·µ»Øºó½«µÃµ½Ò»´ó¶ÑÓÃÓÚÏÔʾ´íÎóµÄhtml´úÂë¡£¶øÒ»°ã
ajaxµ÷Óö ......

Ajax»ù´¡

1£ºAjax¿ÉÒÔͨ¹ýJavaScriptµÄXMLHttpRequest¶ÔÏóÓë·þÎñÆ÷½øÐÐͨÐÅ£¬Í¨¹ýXMLHttpRequest£¬JavaScript¿ÉÒÔÔÚ²»ÖØÔØÒ³ÃæµÄÇé¿öÏÂÓë·þÎñÆ÷½øÐÐͨÐÅ¡£
 
2£ºXMLHttpRequest ä¯ÀÀÆ÷Ö§³Ö
 
<script type="text/javascript">
function ajaxFunction()
{
var xmlHttp;
try
    {
xmlHtt ......

ajaxÓëjQuery·½·¨

ajax.asp
ÏÖÔÚʱ¼äÊÇ< %=Now()%>
ajax.html
<script type="text/javascript">
function Ajax(){
var xmlHttp=null;
if(window.ActiveXObject){
try{
xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
}catch(e){
try{
......

ajaxµ½µ×ºÃ²»ºÃ£¿

µØÖ·£ºhttp://www.qhcar.cc/model/index.aspx?s=5£¬Õâ¸ö¾ÍÊÇǶÌ×ajax½á¹û¡£
http://www.qhcar.cc/model/index.aspx Õâ¸öÊǵ¥¸öµÄajax£¬
Óŵã¾ÍÊÇ¿ÉÒÔÓÃÒ»¸öÒ³ÃæÊµÏÖÏÔʾȫ²¿³µÐͺͰ´¼¶±ðÑ¡Ôñ³µÐÍ£¬ÎªÁËÕչ˵¼º½ÉÏÃæÈç΢ÐͳµµÈÁ´½ÓÔÚ±ðµÄÒ³Ãæ½øÈ룬
http://www.qhcar.cc/model/index.aspx?s=5Õâ¸öµØÖ·²ÎÊýs£¬Åжϵ±s ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ