struts2ʹÓÃajaxµÄÎÊÌâ~~~ - Web ¿ª·¢ / Ajax
ÎÒÏÖÔÚÓÃstruts2¿ò¼ÜÖÐÐèҪʹÓÃajaxʵÏÖ¾Ö²¿Ë¢Ð£¬µ«ÊÇ´ÓÈÝÆ÷Àï·µ»ØµÄÖµ²»ÖªµÀÔõô´Óstruts.xmlÅäÖÃÎļþÀïÓ³Éäµ½jspÒ³ÃæÀÒÔÇ°servletÀïдout.orint("xxxxx")¾Í¿ÉÒԵõ½~£¬µ«ÊÇÏÖÔÚÓÃstruts¾Í²»ÖªµÀÔõôдÁË£¬Ï£ÍûÖªµÀµÄ¸ßÈËÄÜ°ïÎÒ½â¾öÏÂ~Íò·Ö¸Ðл~
°ÑÄãдºÃµÄjsÎļþ·ÅÔÚweb-rootÏÂÃæµÄĿ¼ÀïÃ棬ÔÚweb-inf/web.xmlÅäÖÃ
<servlet>
<servlet-name>Name</servlet-name>
<servlet-class>Class</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>Name</servlet-name>
<url-pattern>URL</url-pattern>
</servlet-mapping>
Ò»°ãµØ£¬struts2Ö÷ÒªÓÃÓÚÏìÓ¦¿Í»§¶ËµÄActionʼþ£¬ÄãÖ»Òª×öºÃ´Ë·½ÃæµÄÒµÎñÂß¼´¦Àí¾ÍÐÐÁË£¬jspÖÐÒýÈëjsÎļþ£¬ÈÃÆäË¢ÐÂ,strutsÖÐaction×÷ºÃÏàÓ¦µÄÌøתÅäÖÃ
²»¶®
°ï¶¥
Ïà¹ØÎÊ´ð£º
´ó¼ÒºÃ£¬Çë¸ßÊÖÃÇÖ¸µã
ÎÒµÄservletÎļþÊÇ£º
package com.ljc.rank.ajax;
import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
......
Èç½ðɽ´Ê°ÔÍøÒ³×óÉϽÇÉϵÄÿÈÕÒ»¾ä
$('#elementID').html();
Ó¦¸Ã¿ÉÒÔ°É
±ð³ÁÁË°¡£¡~£¡
ÎÊÌâ²»¹»ÇåÎú
document.getElementById("¿Ø¼þID").innerHtml;
h ......
ajaxÔõôʵÏÖÐÂÔöÏÂÀÁбíÎÞˢС£ÀàËÆ
http://hi.baidu.com/comasp/blog/item/aa34e736bfc269320a55a9ad.html¡£
»¹ÓÐÍøÒ×163Blog£¬Ìí¼Óblogʱ£¬Èç¹ûдµÄÎÄÕÂûÓкÏÊʵķÖÀà¿ÉÑ¡£¬¿ÉÒÔµã»÷Ìí¼ÓеÄÎÄÕÂÀàÐÍ£¬È»ºóÌ ......
ajax˸ã³öÀ´µÄ¼¼Êõ°¡
µ½µ×Ôõô»ØÊ°¡£¬ÊÇ΢ÈíŪµÄÂ𣬻¹ÊÇgoogle °¡£¬»¹ÊÇÄĸöä¯ÀÀÆ÷¹«Ë¾°¡
The concept behind the XMLHttpRequest object was originally created by the developers of Outlook Web Ac ......