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

jquery+ajaxÎÞˢз­Ò³


 
 
 
 
 
 
 
 
 
ǰ̨×Ô¶¨ÒåͨÓ÷ÖÒ³jquery²å¼þ
(Ò»)¿ò¼Ü:ÓÃjquery+ajax+struts1ʵÏÖ ×Ô¶¯´´½¨ÐкÍÁÐ
³Ö¾Ã²ãÓõÄÊÇabatis.Êý¾Ý¿âÓõÄÊÇMySQL.
(¶þ)sqlMap
shangjia.xmlµÄÅäÖÃÈçÏÂ
<resultMap class="java.util.LinkedHashMap" id="storeMap">
       <result property="sto_id" column="sto_id"/>
       <result property="sto_name" column="sto_name"/>
       <result property="sto_contactphone" column="sto_contactphone"/>
       <result property="sto_time" column="sto_time" javaType="string"/>
    </resultMap>
    
     <statement id="selectListStore" resultMap="storeMap" parameterClass="com.tj_zhongzhixin.common.util.PageResult" >
      select sto_id,sto_name,sto_contactphone,sto_time from store limit #pageSize# offset #throwRows#
      </statement>
 
 
СÌáʾ£ºÎªÊ²Ã´²»ÓÃʵÌåÀàÓ³Éä
ÎÒÖ®ËùÒÔ²»ÓÃʵÌåÀàÓ³Éä(¾ÍÊǽ«resultMapµÄClassÉè³ÉʵÌåÀà)£¬ÊÇÒòΪ×Ô¶¯Éú³ÉµÄ±í¸ñµÄÐÐÊǸù¾Ý¼¯ºÏÖÐMapµÄ¸öÊý¾ö¶¨µÄ£¬¶ø±í¸ñµÄÁÐÊǸù¾Ý¼¯ºÏÖÐMapµÄ¼üÖµ¶ÔµÄ¸öÊý¾ö¶¨µÄ£¬ËùÒÔÈç¹ûÓÃʵÌåÀàÓ³ÉäµÄ»°×Ô¶¯Éú³ÉµÄ±í¸ñµÄÁоÍÒª°´ÕÕʵÌåÀàµÄÊôÐԵĸöÊý¾ö¶¨¡£¶ø²»ÂÛÄãµÄsqlÓï¾äÊÇ·ñÊDzéѯËùÓеÄÊôÐÔ£¬¶¼»á·â×°µ½MapÖÐʵÌåÀàÀï¡£ÕâÑù¾Í²»Äܵĵ½Êµ¼Ê²éѯµÄÊôÐÔ£¬¶øÊÇËùÓеÄÊôÐÔ¡£
СÌáʾ£ºÎªÊ²Ã´ÒªÓÃLinkedHashMap
µ±ÎÒÔËÐÐÒ³ÃæÊÇ׼ȷµÄÏÔʾ³öÁËÎÒÔÚsqlÖÐÖÆ¶¨µÄÊôÐÔ£¬¶ø²»ÊÇËùÓеÄÊôÐÔ¡£µ«ÊÇÓгöÏÖÁËÒ»¸öÎÊÌâ¾ÍÊÇ£ºËüµÄ˳Ѱ¸úÎÒÔÚsqlÖÐÖ¸¶¨µÄ²éѯ²»Ò»ÖÂ(Æð³õ½á¹û¼¯·â×°µ½ÁËHashMapÖÐ)¡£Ô­À´HashMap¼¯ºÏ»á×Ô¶¯¸øÖµÅÅÐò£¬ºó·¢ÏÖLinkedHashMap²»»á×Ô¶¯ÅÅÐò¡£ËùÒÔ¾ÍÑ¡ÔñÁËLinkedHashMap
 
 
(Èý)query
jQuery.searchByPage.js
//jQueryÌá½»ÇëÇóÊý¾Ý
/*actionNameÎªÒªÌø×ªµ½µÄactionµÄname
*paramÎªÒ³Ãæ²ÎÊý£¨°üÀ¨struts-config.xmlÖеÄparameterºÍÆäÖµ,Ò³Êý,ÿҳÏÔʾµÄÌõÊý,²éѯµÄÌõ¼þ£©
*optionsΪ²Ù×÷µÄͼ±êÐÅÏ¢
*/
(functio


Ïà¹ØÎĵµ£º

WCFÖеķþÎñºÍASP.NET AJAXÖеÄWebService

WCFµÄ¼Ü¹¹£ºusing System.ServiceModel;
ÆõÔ¼:Contract
[ServiceContract]
public partial interface IContract
{
        [OperationContract]
        string DocumentWebHostUrl();
}
·þÎñ£ºService
[ServiceBehavior(IncludeException ......

ajax ͨÓ÷½·¨

var xmlHttp;
// ´´½¨XMLHttpRequest¶ÔÏó
function createXMLHttpRequest() {
    try {
        // FireFox, Opera 8.0 +, Safari
        xmlHttp = new XMLHttpRequest();
    }
    catch ......

AJAX°²×°

http://ajaxcontroltoolkit.codeplex.com/releases/view/33804
1>°²×°Ajax ASPAJAXExtSetup.msi £¨ÔÚhttp://ajax.asp.netÏÂÔØ£©
2>°²×°AjaxÄ£°å ASPAJAXSamples.msi
3>ÏÂÔØ ×îа汾 ajaxcontroltoolkit
  http://www.codeplex.com/Release/ProjectReleases.aspx?ProjectName=AtlasControlToolkit
......

¡¾¾ÉÎÄ¡¿AJAX×ܽᣨһ£©

AJAX¼ò½é
Ò»¡¢AJAXÊÇʲô
ÔÚ´«Í³µÄwebÓ¦ÓÃÖУ¬Óû§ÓëÓ¦ÓõÄÿһ´Î½»»¥£¬¶¼ÊÇÊ×ÏÈÓû§Í¨¹ýä¯ÀÀÆ÷Ïò·þÎñÆ÷¶Ë·¢ËÍÒ»¸ö
ÇëÇ󣬷þÎñÆ÷½âÎöÕâ¸öÇëÇ󣬽«ÏàÓ¦µÄÏìÓ¦ÐÅÏ¢·µ»Ø¸øä¯ÀÀÆ÷¡£ÔÚ·þÎñÆ÷¶ËÒµÎñÂß¼­·Ç³£¸´ÔÓ»òÕßÐèÒªºÄʱ½Ï³¤µÄÇé¿öÏ£¬ä¯ÀÀÆ÷µÈ´ýË¢ÐÂʱ£¬Ò³Ãæ¾­³£ÊÇһƬ¿Õ
°×£¬Óû§Ö»Äܱ»¶¯µÈ´ý·þÎñÆ÷¶ËÏìÓ¦Íê³É£¬ÔÚ´ËÆÚ¼ ......

¡¾¾ÉÎÄ¡¿AJAX×ܽᣨ¶þ£©

ËÄ¡¢DOM
1.DOM¸ÅÊö
XHR¶ÔÏóÌṩÁ˸ú·þÎñÆ÷ͨѶµÄÄÜÁ¦£¬¶øDOMÌṩÁË·ÃÎÊ¡¢¶¯Ì¬¸üÐÂÒ³ÃæµÄÄÜÁ¦¡£
DOMÊÇW3CÍÆ³öµÄÎĵµ¶ÔÏóÄ£ÐÍ£¬ÊDZíʾÎĵµºÍ·ÃÎÊ¡¢²Ù×÷¹¹³ÉÎĵµµÄ¸÷ÖÖÔªËØµÄAPI£¬±»¶¨ÒåΪ¶ÀÁ¢ÓÚÓïÑԵıê×¼£¬ÔÚjavascriptºÍjavaÒÔ¼°ÆäËûÓïÑÔÖж¼ÓÐʵÏÖ¡£
ÔÚDOMÖУ¬HTMLÎĵµµÄ²ã´Î»ú¹¹±»±íʾΪÊ÷Ðνṹ£¬Ê÷µÄ½Úµã±íʾÎĵµÖÐ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ