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

¼òµ¥AJAX ʹÓÃ

 var xmlHttp;
    function createXMLHttpRequestss() {
     if (window.ActiveXObject) {
      xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
     }else if (window.XMLHttpRequest) {
      xmlHttp = new XMLHttpRequest();
     }
    }
     
     function startRequest(){
     var projectName = document.getElementById("pronameid").value;
     var alarmName = document.getElementById("alarmNameId").value;
      var url = "getAgentNo.action?randcount="+Math.random()+"&code="+document.getElementById("selectId").value+"&alarmName="+alarmName+"&projectName="+projectName+"&skillName="+document.getElementById("skillGroupId").value;
      createXMLHttpRequestss();
         xmlHttp.onreadystatechange = handleStateChange;
      xmlHttp.open("get",url,false);
      xmlHttp.send(null);
     }
    
     function handleStateChange(){
      if(xmlHttp.readyState == 4 ) {
              if(xmlHttp.status == 200) {
               if(xmlHttp.responseText == null || xmlHttp.responseText == ""){
                return;
               }
        var obj =eval('('+ xmlHttp.responseText+')');
       


Ïà¹ØÎĵµ£º

³õʶAjax¼¼Êõ1

Ò» ÒýÌâ
ÈçºÎÈÃweb³ÌÐòÓÃÆðÀ´Ïñ×ÀÃæÓ¦ÓóÌÐòÒ»Ñù¼òµ¥£»
ÅÖ¿Í»§¶Ë£¿ÊÝ¿Í»§¶Ë£¿ÈçºÎÑ¡Ôñ£¿-----¿´ÐèÇ󣬿´Óû§µÄʹÓã¬Áé»îµ÷½Ú¡£
²»ÒªÉÁ˸£¬¿Õ°×Ò³³öÏÖ£¿
 
¶þ ³õʶAjax
1.    AjaxÊÇÒ»¸ö¿Í»§¶Ë¼¼Êõ£¬²»ÂÛÄãÏÖÔÚʹÓúÎÖÖ·þÎñÆ÷¶Ë¼¼Êõ£¬¶¼ÄÜʹÓÃAjax£¬¶ø²»¹ÜʹÓõÄÊÇJava¡¢.NET¡¢Ruby¡¢PHP»¹ÊÇCGI¡ ......

ʹÓà jQuery ¼ò»¯ Ajax ¿ª·¢

jQuery ÊÇÒ»¸öJavaScript ¿â£¬ËüÓÐÖúÓÚ¼ò»¯ JavaScript™ ÒÔ¼° Asynchronous JavaScript + XML (Ajax) ±à³Ì¡£ÓëÀàËÆµÄ JavaScript ¿â²»Í¬£¬jQuery ¾ßÓжÀÌصĻù±¾Ô­Àí£¬¿ÉÒÔ¼ò½àµØ±íʾ³£¼ûµÄ¸´ÔÓ´úÂ롣ѧϰ jQuery »ù±¾Ô­Àí£¬Ì½Ë÷ÆäÌØÐԺ͹¦ÄÜ£¬Ö´ÐÐһЩ³£¼ûµÄ Ajax ÈÎÎñ²¢ÕÆÎÕÈçºÎʹÓòå¼þÀ©Õ¹ jQuery¡£
jQuery ÊÇʲ ......

Ò»¿î¾­µäµÄajaxµÇ¼ҳÃæ ºǫ́asp.net

 1£¬Ð½¨Ò»ÃûΪlogin.htmµÄ¾²Ì¬ÍøÒ³Îļþ£¬×÷ΪµÇ¼ҳÃ棬Èçͼ
body±êÇ©´úÂë
<body onkeydown ="enterLogin()"> <!--Ìí¼Ó°´Ï¼üÅÌʼþ-->
<div style="text-align: center" mce_style="text-align: center">
<table border="1" cellpadding="1">
<tr>
<td align="center" s ......

½â¾öajaxÒÔpost·½Ê½´«²Îʱ£¬×Ö·û´®ÖÐÓе¥ÒýºÅµÄ´íÎó¡£

 ½ñÌìÓÃajaxµÄpost·½Ê½´«ÖµÊ±£¬Óöµ½Ò»¸öÎÊÌ⣬ʼÖÕûÓÐÕÒµ½ÎÊÌâÔ­Òò¡£ºóÀ´°Ñ´«µÄÖµÖе¥ÒýºÅÈ¥µôºó£¬jsÕý³£ÁË¡£
¾­¹ýËÑË÷£¬Ò²Ã»ÓÐÕÒµ½¾ßÌåÔ­Òò¡£×îºóͨ¹ýÒþ²ØÓòÀ´ÖÐת¸Ã×Ö·û´®¡£×îºó½â¾öÕâ¸öÎÊÌ⣡ÎÞÓïÁË£¡±¸Íü£¡
js²¿·Ý£º
////Òì²½µ÷Ó÷þÎñÆ÷ÐÅÏ¢
function CallServiceInsert()
{
var url="";
var para ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ