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

ajaxÔõôʵÏÖÐÂÔöÏÂÀ­ÁбíÎÞˢР- Web ¿ª·¢ / Ajax

ajaxÔõôʵÏÖÐÂÔöÏÂÀ­ÁбíÎÞˢС£ÀàËÆ
http://hi.baidu.com/comasp/blog/item/aa34e736bfc269320a55a9ad.html¡£
»¹ÓÐÍøÒ×163Blog£¬Ìí¼Óblogʱ£¬Èç¹ûдµÄÎÄÕÂûÓкÏÊʵķÖÀà¿ÉÑ¡£¬¿ÉÒÔµã»÷Ìí¼ÓеÄÎÄÕÂÀàÐÍ£¬È»ºóÌîд£¬Ñ¡ÔñÈ·¶¨£¬ÏÂÀ­Áбí¾ÍÏÔʾ¸ÃÀàÐÍÁË£¬¾Í×Ô¶¯°ÑËü¼ÓÉÏÁË£¬ÕâÀïÓõÄÓ¦¸ÃÊÇajax°É£¬ÇëÎÊ´óʦÃǾßÌåÊÇÔõôʵÏֵİ¡¡£

ÎÒÏÖÔÚÔÚ×öÖ§³ö¹ÜÀí£¬Ö§³öÏîÊÇÏÂÀ­ÁÐ±í£¬Êý¾ÝÊÇÔÚÊý¾Ý¿âÖÐÖ§³öÏî±íÖжÁÈ¡³öÀ´µÄ£¬Èç¹ûÖ§³öÏîÖÐûÓÐÓû§ÒªÑ¡µÄÏ¿ÉÒÔÑ¡ÐÂÔö£¬È»ºóʵÏÖÌí¼Ó£¬µ«Ã»ÓÐË¢ÐÂÒ³Ã棬ÏÂÀ­ÁбíÖоÍÏÔʾ³öÓû§ÌîдµÄÄÚÈÝÀ´

Çë´óʦÃÇ˵µÄ¾ßÌåЩ ÏêϸЩ£¬¿ÉÒÔô
ÓÃjs¹¹Ôìselect¿Ø¼þ

ÒýÓÃ
ÓÃjs¹¹Ôìselect¿Ø¼þ

ÄÜ˵µÃ¾ßÌåЩÂð

var select_obj = document.getElementById("your_select_id");
select_obj.innerHTML("<option>123<option>");
Æäʵ¿ÉÒÔѧϰѧϰ jqueryÕâÀàjs¿ò¼Ü¿ª·¢¡£ÄÇдÆðjs¾ÍÈÝÒ׶àÁË~

ÒýÓÃ
var select_obj = document.getElementById("your_select_id");
select_obj.innerHTML(" <option>123 <option>");
Æäʵ¿ÉÒÔѧϰѧϰ jqueryÕâÀàjs¿ò¼Ü¿ª·¢¡£ÄÇдÆðjs¾ÍÈÝÒ׶àÁË~


²»ÖªµÀÄú¿´ÁËÎÒ˵µÄÄǸöÍøÖ·ÁËÂ𣿾ÍÊǵã»÷ÐÂÔöµ¯³öÒ»¸öС´°¿Ú£¬ÓÃÀ´ÌîдеķÖÀ࣬<a style="cursor:hand" onclick="javascript:addType()">Ìí¼ÓÐÂÀàÐÍ</a>È»ºóaddType()´´½¨Îı¾¿ò È·¶¨°´Å¥Âð£¿È»ºóÔÙ´«¸øÊý¾Ý¿â£¬ÏÔʾÔÚÊý¾Ý¿âÖÐÂð£¿Èç¹ûÊǵĻ°£¬¸ÃÔõô´´½¨£¬ÔõôˢÐÂÏÂÀ­ÁбíÄØ


ÓÃvar a =


Ïà¹ØÎÊ´ð£º

Hibernate+spting+struts+ajax ÕûºÏÎÊÌâ

´ó¼ÒºÃ£¬Çë¸ßÊÖÃÇÖ¸µã
ÎÒµÄservletÎļþÊÇ£º
package com.ljc.rank.ajax;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
......

ajaxÎÊÌâ

ÎÒÓÃxmlhttprequest·µ»ØxmlÊý¾Ý
·µ»ØÖ®ºóÎÒÏëÔÚºǫ́ȡµ½¸Ãxml×÷ΪÊý¾Ý°ó¶¨¿Ø¼þµÄÊý¾ÝÔ´
ViewStateÔõô´¦Àí£¿

ÎÒÓÃxmlhttprequest·µ»ØxmlÊý¾Ý
·µ»ØÖ®ºóÎÒÏëÔÚºǫ́ȡµ½¸Ãxml×÷ΪÊý¾Ý°ó¶¨¿Ø¼þµÄÊý¾ÝÔ´
- ......

¹ØÓÚAJAXµÄBean×¢Èë

ͨ¹ýÒ³ÃæJS·ÃÎÊActionÀàµÄʱºò,ServiceÀ౨¿ÕÖ¸ÕëÒì³£.¼ì²éÁËÃû³Æ,µÈ·¢ÏÖûÓÐÎÊÌâ,Ò²¾ÍÊÇûÓÐ×¢½øÀ´.
ºóÀ´Ö»ÄÜ×Ô¼ºÍ¨¹ýContextÈ¥SpringÅäÖÃÎļþÖÐÈ¡BeanÁË.´ó¼ÒÖªµÀÕâÊÇΪʲôÂð?
dwrÖ§³Öspring×¢ÈëµÄ
struts ......

ΪʲôʹÓÃAJAXºǫ́´úÂëÖ»Ö´ÐÐÒ»´Î

ÎÒ²âÊÔÒ»¸öAJAXµÄСÀý×Ó£¬ÏÂÃæÊÇÒ³ÃæÎļþ£¨Default.aspx),¸ÃÎļþûÓзþÎñ¶Ë´úÂë
ÎÒ²âÊÔʱֻÓеÚÒ»´ÎÏÔʾʱ¼äÕýÈ·£¬ºóÃæÔõôµã»÷°´Å¥¶¼²»Ë¢ÐÂʱ¼äÁË£¬
òËÆHandler1.ashxÖеĴúÂëÖ»Ö´ÐÐÒ»´Î
Çë¸÷λ°ï°ïæ£¬Ê ......

ajax¿ò¼ÜÓëaspnetpager·ÖÒ³¿Ø¼þµÄÔËÓÃ

aspxÎļþ
<webdiyer:aspnetpager id="pager2" runat="server" firstpagetext="Ê×Ò³"
                      &nb ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ