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

Ajax»ñÈ¡²ãµÄ·½·¨

var x,y;
 //ÕâÊÇÒ»¸öͨ¹ýAJAXÈ¡µÃÌáʾÐÅÏ¢µÄ·½·¨
  function over(noteContent){
   //¼Ç¼Ê¼þ·¢ÉúʱµÄÊó±êλÖÃ
   x = event.clientX;
   y = event.clientY; 
   //ÏÔʾ¹¤¾ßÌáʾ
   document.getElementById("tip").style.display = "block";
   //ÏÔʾ¹¤¾ßÌáʾµÄÆðʼ×ø±ê
   document.getElementById("tip").style.top = y;
   document.getElementById("tip").left = x+10;
   document.getElementById("tip").innerHTML="<table width=\"160\" border=\"0\" cellpadding=\"0\"" +
   "cellspacing=\"0\" class=\"STYLE1\"><tr> <td>ÄÚÈÝ£º"+noteContent+"</td> </tr></table>";   
  }
  
   function out(){
   document.getElementById("tip").style.display = "none";
  }
»ñÈ¡¶à¸ö²ÎÊý
<script type="text/javascript">
var x,y;
 //ÕâÊÇÒ»¸öͨ¹ýAJAXÈ¡µÃÌáʾÐÅÏ¢µÄ·½·¨
  function over(btime,etime,departName,PuserName){
   //¼Ç¼Ê¼þ·¢ÉúʱµÄÊó±êλÖÃ
   x = event.clientX;
   y = event.clientY; 
   //ÏÔʾ¹¤¾ßÌáʾ
   document.getElementById("tip").style.display = "block";
   //ÏÔʾ¹¤¾ßÌáʾµÄÆðʼ×ø±ê
   document.getElementById("tip").style.top = y;
   document.getElementById("tip").left = x+10;
   document.getElementById("tip").innerHTML="<table width=\"160\" border=\"0\" cellpadding=\"0\"" +
   "cellspacing=\"0\" class=\"STYLE1\"><tr> <td>¿ªÊ¼Ê±¼ä£º"+btime+"</td> </tr><tr> <td>½áÊøʱ¼ä£º"+etime+
   "</td></tr><tr> <td>²¿ÃÅ£º"+departName+"</td></tr><tr> <td>Ô¤Ô¼ÈË£º"+PuserName+"</td></tr></table>";   
&nbs


Ïà¹ØÎĵµ£º

Á÷ÐеÄAJAX¿ò¼Ü¶Ô±È£ºjQuery£¬Mootools£¬Dojo£¬Ext JS

À´Ô´£ºhttp://developer.51cto.com/art/200906/129502.htm
±¾ÎĽéÉÜÁËËÄÖÖÁ÷ÐеÄAJAX¿ò¼Ü£¬°üÀ¨¼ò½àµÄjQuery£¬ÃæÏò¶ÔÏóµÄ
Mootools£¬ÓµÓÐÇ¿´óÖ§³ÖµÄDojo£¬ÒÔ¼°×é¼þ»¯£¬RIA»¯µÄExt JS¡£
AJAX
ÊÇweb20
µÄ»ùʯ£¬ÏÖÔÚÍøÉÏÁ÷Ðм¸ÖÖ¿ªÔ´µÄ
AJAX¿ò¼Ü£¬±ÈÈ磺jQuery,Mootools,Dojo,Ext JSµÈµÈ£¬ÄÇôÎÒÃǵ½µ×ÔÚʲôÇé¿öϸÃÊ¹Ó ......

asp.netʹÓÃajaxºóÈçºÎÔÚ¿Í»§¶Ëµ¯³öÌáʾ¶Ô»°¿ò

//ƽ³£µ÷ÓÃjavascript·½·¨
ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert'Weclome!!!');</script>");
±³¾°²»Îª°×É«µÄ·½·¨£º
Page.ClientScript.RegisterStartupScript(Page.GetType(), "message", "<script language='javascript' defer>alert('Ìí¼Óʧ°Ü£¬ÇëÁªÏµ¼¼ÊõÔ±£¡') ......

Jquery ÖÐAjaxʹÓõÄËÄÖÖÇé¿ö

<script type="text/javascript" language="javascript" src="JS/jquery-1[1].2.3.min.js"></script>
    <script type="text/javascript" language="javascript">
    $(document).ready(function(){   //Jquery Ò³Ãæ¼ÓÔØʼþ£¬µ±Ò³Ãæ¼ÓÔØÖ®ºóÊ× ......

AjaxÈý²½ÇúºÍDWRµÄʹÓÃ

ʹÓÃDWR¿ª·¢AjaxÓ¦Óãº
1¡¢µ¼ÈëDWRµÄJar°ü£ºdwr.jar;
2¡¢ÔÚ/WEB-INFÏÂÌí¼Ódwr.xmlÅäÖÃÎļþ£»
3¡¢ÔÚweb.xmlÎļþÖÐÅäÖÃdwrµÄ·þÎñÆ÷¶Ë×é¼þ£¨DwrServlet£©:
<!-- Ìí¼ÓDWRµÄServlet -->
  <servlet>
  <servlet-name>dwr</servlet-name>
  <servlet-class>org.direc ......

php+AJAX´«ËÍÖÐÎĻᵼÖÂÂÒÂëµÄÎÊÌâµÄ½â¾ö·½·¨

¹ØÓÚÔÚAJAXÖÐGET»ØµÄResponseTextÖÐÎÄÂÒÂëµÄ×î¼ò½â¾ö°ì·¨
//Èç¹û´«ËͲÎÊýÊÇÖ±½Ó¸³ÓèµÄ£¬¾Í»á²úÉúÂÒÂë!
´úÂëÈçÏÂ:
http_request.open("POST",url,true);
http_request.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
http_request.send("action="+strName+"&val="+val); //Èç¹ûvalµÄ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ