Ŀ¼
- 1£¬PCDµ¶¾ßµÄº¸½Ó·½·¨³£ÓõÄÓÐÄļ¸¸ö
- 2£¬jqueryÖÐÔõÑùÏò$.ajax()µÄsuccessÀï´«µÝÒ»¸ö±äÁ¿£¿
- 3£¬jqueryÖеÄajaxÔõôÓÃ
- 4£¬jquery ajaxÿ´Îµã»÷°´Å¥¼ÓÔØÎåÌõÐÅÏ¢
- 5£¬ajaxÔõôʵÀý»¯¡£¡£¡£²½ÖèÏêϸµã¡¢¡¢jqueryÔõôʵÏÖ°¡¡£¡£
- 6£¬JqueryºÍajaxµÄ¾ßÌåÇø±ðÊÇʲô£¿
- 7£¬ajaxºÍjsºÍjquery ÈýÕßÓÐʲô¹Øϵ
- 8£¬JqueryÖг£ÓõÄAJaxµÄ·½·¨ÓÐÄļ¸¸ö
- 9£¬jQueryµÄ$ajax·½·¨ÏìÓ¦Êý¾ÝÀàÐÍÓÐÄļ¸ÖÖ
- 10£¬JQueryµ÷ÓÃajax,Ôõô»ñÈ¡·µ»ØµÄ¶ÔÏóµÄij¸öÊôÐÔ
- 11£¬jqueryµÄajaxÔõô·¢ËÍͬ²½ÇëÇó
- 12£¬ajax ÈçºÎͬ²½µ÷ÓÃ
1£¬PCDµ¶¾ßµÄº¸½Ó·½·¨³£ÓõÄÓÐÄļ¸¸ö
![PCDµ¶¾ßµÄº¸½Ó·½·¨³£ÓõÄÓÐÄļ¸¸ö](http://www.muahang1k.com/uploads/img2/9311b3a41d932224782c3661405269c6922397.jpg)
PCDµÄº¸½Ó·½·¨
1) ¼¤¹âº¸½Ó
¼¤¹âº¸(Laser Beam Welding)ÊÇÀûÓøßÄÜÁ¿Ãܶȵļ¤¹âÊø×÷ΪÈÈÔ´µÄÒ»ÖÖ¸ßЧ¾«Ãܺ¸½Ó·½·¨¡£¼¤¹âº¸½Ó¾ßÓиßÄÜÁ¿Ãܶȡ¢¿É¾Û½¹¡¢É͸¡¢¸ßЧÂÊ¡¢ÊÊÓ¦ÐÔÇ¿µÈÓŵ㡣¼¤¹âº¸½Ó ¹ý³ÌÊôÓÚ´«µ¼º¸½Ó£¬¼´¼¤¹â·øÕÕ¹¤¼þ±íÃ棬²úÉúµÄÈÈÁ¿Í¨¹ýÈÈ´«µ¼ÏòÄÚ²¿´«µÝ¡£Í¨¹ý¿ØÖƼ¤¹âÂö³åµÄ¿í¶È¡¢ÄÜÁ¿¡¢·åÖµ¹¦ÂʺÍÖظ´ÆµÂʵȲÎÊý£¬Ê¹¹¤¼þ´ïµ½Ò»¶¨µÄÈÛ ³ØÉî¶È¶ø±íÃæÓÖÎÞÃ÷ÏÔµÄÆû»¯£¬¼´¿É½øÐк¸½Ó¡£ÓÉÓÚ¹¦ÂÊÃܶȴó(¿É´ï109W/cm2)£¬Òò´Ë¼¤¹âº¸½Ó¹ý³ÌÖÐÔÚ½ðÊô²ÄÁÏÉÏÉú³ÉС¿×£¬¼¤¹âÄÜÁ¿Í¨¹ýС¿×Íù¹¤¼þ µÄÉ´«Ê䣬¼õÉÙºáÏòÀ©É¢£¬²ÄÁϵÄÈÚºÏÉî¶È´ó£¬º¸½ÓËٶȿ죬µ¥Î»Ê±¼äº¸ºÏµÄÃæ»ý´ó¡£´ËÍ⣬¼¤¹âº¸½ÓÐγɵ帷ìÉî¶øÕ£¬Éî¿í±È´ó(¿É´ï2¡«10)£¬º¸ºÏµ¥Î» Ãæ»ýËùÐèÄÜÁ¿Ð¡£¬ÈÈÓ°ÏìÇøС£¬º¸½Ó±äÐÎС¡£Ò»°ã²»¼ÓÌî³ä½ðÊô£¬ÒÀÀµº¸¼þ×ÔÉíÈںϡ£¼¤¹âº¸½ÓϵͳÓи߶ȵÄÈáÐÔ£¬Ò×ÓÚʵÏÖ×Ô¶¯»¯¡£µ«Óü¤¹âº¸½Óʱ£¬ÒªÇ󱻺¸¼þ ÓнϸߵÄ×°Å侫¶È£¬ÔʼװÅ侫¶È²»ÄÜÒòº¸½Ó¹ý³ÌÈȱäÐζø¸Ä±ä£¬ÇÒ¹â°ßÓ¦ÑϸñÑØ´ýº¸·ìɨÃè¶ø²»ÄÜÓÐÏÔÖøµÄÆ«ÒÆ£¬·ñÔò½«Ôì³ÉÑÏÖصĺ¸½ÓȱÏÝ¡£´ËÍ⣬ÓÉÓÚ¼¤¹âÆ÷ ¼°Æ亸½ÓϵͳµÄÒ»´ÎͶ×ʽϴ󣬺¸½Ó³É±¾¸ß£¬¶Ôĸ²ÄµÄÒªÇó½Ï¸ß£¬²ÎÊý¶à£¬¶Ô²Ù×÷¼¼ÄܵÄÒªÇó¸ßµÈµÈ£¬¶¼ÖÆÔ¼Á˼¤¹âº¸½ÓµÄ¹ã·ºÓ¦Óá£Ê¹Óü¤¹â½øÐÐPCD¸´ºÏƬµÄ º¸½Ó£¬»ñµÃµÄº¸½Ó½ÓÍ·Ç¿¶È¿É¸ß´ï1800MPa£¬ÇÒ¶Ô½ð¸Õʯ²ã²»»á²úÉúÈÈËðÉË£¬ÊÇÒ»ÖÖÀíÏëµÄPCDº¸½Ó·½·¨£¬Ä¿Ç°¶àÓÃÓÚ½ð¸ÕʯԲ¾âƬµÄº¸½Ó¡£
2) Õæ¿ÕÀ©É¢º¸
Õæ¿ÕÀ©É¢º¸(Vacuum Diffusion Bonding)ÊÇÖ¸ÔڽϸߵÄζȺͽϴóµÄѹÁ¦Ï£¬Ê¹´¦ÓÚÕæ¿ÕÖÐÇå½àµÄÁã¼þ±íÃæÏ໥¿¿½ü£¬ÔÚÏ൱СµÄ¾àÀëÄÚÔ×ÓÏ໥À©É¢´Ó¶ø½«Á½²¿·ÖÁ¬½ÓÔÚÒ»ÆðµÄº¸½Ó·½ ·¨¡£Õæ¿ÕÀ©É¢º¸Ò»°ãÊÇÔÚ±»º¸²ÄÁÏÈÛµãζÈ(¾ø¶ÔζÈ)µÄ60%¡«80%µÄζÈϽøÐеģ¬Òò´Ë¶ÔÓÚÅòÕÍϵÊý²îÒìºÜ´óµÄ²ÄÁÏ(ÈçPCD¸´ºÏƬµÄÓ²ÖʺϽð»ùµ×Óë 45#¸Öµ¶¸Ë)£¬´ËÖÖ·½·¨ÏÔµÃÊ®·ÖÓÐЧ¡£ÔÚ½øÐÐÀ©É¢º¸Ê±£¬Áã¼þÔÚÕæ¿ÕÊÒÖеļÓÈÈÊÇÔÚ²»¶ÏÍùÍâ³éÆøµÄÇé¿öϽøÐеģ¬Òò¶øÄܳýµôÁã¼þ±íÃæµÄÎü¸½ÆøÌåºÍÑõ»¯Ä¤¡£ ´ËÍ⣬Õæ¿ÕÀ©É¢º¸Äܱ£³Ö¹¤¼þµÄ¼¸ºÎ³ß´çºÍÐÎ×´¾«¶È£¬»ñµÃ¾ßÓÐÕæ¿ÕÃÜ·âµÄ¡¢ÈÈÎȶ¨µÄ¡¢¿¹ÕðµÄ½ÓÍ·¡£Òò´Ë£¬Õæ¿ÕÀ©É¢º¸ÔÚPCDµØÖÊ×êÍ·µÄº¸½ÓÖеõ½Á˹㷺Ӧ Óá£ËüµÄÓ¦Óÿɱ£Ö¤×êÍ·µÄÖÊÁ¿£¬Ìá¸ßº¸½ÓÇ¿¶È£¬Ôö´ó×êÍ·µÄ½ø³ßÉî¶È¡£ÃÀ¹úÉ£µÏÑÇʵÑéÊÒÔÚº¸½Ó±íÃæ½øÐжÆÄø´¦Àí£¬¶Æ²ãºñ25¡«50µ£¬È»ºóÔÚ650¡æϾÊÜ 214.62MPaµÄѹÁ¦´ï4Сʱ£¬½øÐÐÕæ¿ÕÀ©É¢º¸£¬Æä¼ôÇÐÇ¿¶ÈΪ413.36¡«551.2MPa¡£
ʹÓÃÕæ¿ÕÀ©É¢º¸½øÐÐPCD¸´ºÏƬº¸½Óʱ£¬Æ亸½Ó¹¤ÒÕ¹ý³Ì¸´ÔÓ£¬º¸½Óʱ¼ä½Ï³¤£¬³É±¾¸ß£¬ÐèÓÃרÓÃÉ豸£¬Ò»´ÎÐÔͶ×ʺܴó¡£Ä¿Ç°£¬Õæ¿ÕÀ©É¢º¸Ò»°ãÖ»ÓÃÓÚº¸½ÓÇ¿¶ÈÒªÇó¸ß¡¢Ê¹ÓÃʱÕñ¶¯½Ï´óµÄµØÖÊ×êÍ·µÄº¸½Ó£¬»¹Î´ÓÃÓÚ´óÅúÁ¿ÖÆÔìͨÓõ¶¾ßµÄÉú²úÖС£
3) Õæ¿ÕÇ¥º¸
Õæ¿ÕÇ¥º¸(Vacuum Brazing)ÊÇÖ¸ÔÚÕæ¿Õ״̬ϽøÐÐÁã¼þµÄÇ¥º¸º¸½Ó¡£ÓÉÓÚÕâÖÖ·½·¨ÊÇÔÚÎÞÑõ»¯ÆøÌåµÄÆø·ÕÖнøÐеģ¬ËùÒÔÄÜ»ñµÃÇ¿¶È¡¢ÈÍÐԺ;ùÔÈÐÔ¶¼±È½Ï¸ßµÄÓÅÁ¼½ÓÍ·£¬ÊÇ Ò»ÖÖÐÂÐ˵ĺ¸½Ó·½·¨¡£½øÐÐÕæ¿ÕÇ¥º¸±ØÐë²ÉÓÃרÓÃÉ豸£¬º¸½Ó¹ý³ÌÖУ¬ÔÚ¿ØÖÆÕæ¿Õ¶ÈµÄͬʱ»¹Òª¿ØÖƺ¸½Óζȣ¬Òò´Ë¹¤ÒÕ¸´ÔÓ£¬²Ù×÷ÄѶȽϴó¡£Ä¿Ç°£¬ÀûÓÃÕæ¿ÕÇ¥º¸ µÄ·½·¨½øÐÐPCDÓÍÌï×êÍ·µÄº¸½Ó£¬ÆäÇ¥·ìµÄ¼ôÇÐÇ¿¶È¿É´ï451.9MPa
4) ¸ßƵ¸ÐӦǥº¸
¸ßƵ¸ÐÓ¦¼ÓÈȼ¼ÊõÊǶþÊ®ÊÀ¼Í³õ·¢Õ¹ÆðÀ´µÄÒ»Ïî¼ÓÈȼ¼Êõ¡£ÓÉÓÚËü¾ßÓмÓÈÈËٶȿ졢²ÄÁÏÄÚ²¿·¢ÈȺÍÈÈЧÂʸߡ¢¼ÓÈȾùÔÈÇÒÓÐÑ¡ÔñÐÔ¡¢²úÆ·ÖÊÁ¿ºÃ¡¢¼¸ºõÎÞ»·¾³ÎÛ È¾¡¢Ò×ÓÚʵÏÖÉú²ú×Ô¶¯»¯µÈһϵÁÐÓŵã¶øµÃµ½Ñ¸ËÙÍƹ㡣Ŀǰ£¬ÕâÖÖ¼ÓÈȼ¼ÊõÔÚ»ú´²ÖÆÔì¡¢Æû³µ¡¢ÍÏÀ»úÖÆÔì¡¢Öá³ÐÖÆÔì¡¢Á¿¾ßÈоßÖÆÔì¼°Ò»°ã»úеÁã¼þÖÆÔìÖж¼µÃ µ½Á˹㷺ӦÓ㬲¢ÇÒÆäÓ¦Ó÷¶Î§ÈÕÒæÀ©´ó£¬¸ßƵ¸ÐӦǥº¸¾ÍÊÇÆäÖÐÒ»¸öÖ÷ÒªÓ¦Ó÷½Ïò¡£
¸ßƵ¸ÐӦǥº¸(Hi-frequency Induction Brazing)¾ÍÊÇÀûÓõç´Å¸ÐÓ¦ÔÀíʹµç´ÅÄÜÔÚÇ¥ÁϺÍÁã¼þÖÐת»¯³ÉÈÈÄÜ£¬½«Ç¥ÁϼÓÈȵ½ÈÛÈÚ״̬£¬´Ó¶ø½«Áã¼þº¸½ÓÔÚÒ»ÆðµÄº¸½Ó·½·¨¡£²ÉÓÃÕâÖÖ·½·¨£¬Ç¥º¸¼Ó ÈÈËٶȿ죬¹¦ÂÊÃܶȿɴï10¡«100kW/cm2£¬Í¨³£¿ÉÔÚ¼¸ÃëÖÓÄÚÍê³É¼ÓÈȹý³Ì£¬²¢Äܱ£Ö¤Áã¼þµÄ³ß´ç¾«¶È£¬Æä¼ôÇÐÇ¿¶È¿É´ï300¡«400MPa¡£
Ó뼤¹âº¸½Ó¡¢Õæ¿ÕÀ©É¢º¸¡¢Õæ¿ÕÇ¥º¸µÈº¸½Ó·½·¨±È½Ï£¬¸ßƵ¸ÐӦǥº¸µÄ×î´óÓÅÊÆÔÚÓÚÆäÉ豸Ͷ×ÊÉÙ¡¢º¸½Ó¹¤ÒÕÒ×ÓÚÕÆÎÕ£¬ÆäȱµãÔÚÓÚ¸ßƵ¸ÐÓ¦¼ÓÈȵÄζÈÄÑÓÚ¿ØÖÆ¡£Ä¿Ç°£¬¸ßƵ¸ÐӦǥº¸PCD¸´ºÏƬµÄÓ¦ÓñȽϹ㷺£¬µ«Æ乤ÒÕ»¹ÓдýÓÚ½øÒ»²½Ìá¸ß¡£
2£¬jqueryÖÐÔõÑùÏò$.ajax()µÄsuccessÀï´«µÝÒ»¸ö±äÁ¿£¿
//1:$("article").each(function(){var ajax_url = "";var ajax_data = eval('(' + "" + ')'); var obj=$(this);//±£´æµ±Ç°this¶ÔÏó $.ajax({type:'post',url:ajax_url,data:ajax_data,dataType:'text',async:true, success:function(back){ $(obj)//ʹÓÃ֮ǰ±£´æµÄ¡®this¡¯¶ÔÏó }, error:function(e1,e2,e3){ }});//2:$("article").each(function(k,v){var ajax_url = "";var ajax_data = eval('(' + "" + ')'); $.ajax({type:'post',url:ajax_url,data:ajax_data,dataType:'text',async:true, success:function(back){ //v¾ÍÊÇÄãÒªµÄthis¶ÔÏó }, error:function(e1,e2,e3){ }});
3£¬jqueryÖеÄajaxÔõôÓÃ
ÔËÓÃajax()·½·¨£¬±ÈÆäËüÈçload()¡¢get()¡¢post()È«¾ÖÐÔº¯ÊýËü¸ü¶àµØ¹ØעʵÏÖ¹ý³ÌÖеÄϸ½Ú£»Ê×ÏÈÒªÁ˽âÆä²ÎÊýÁÐ±í£º
url: ÒªÇóΪStringÀàÐ͵IJÎÊý£¬£¨Ä¬ÈÏΪµ±Ç°Ò³µØÖ·£©·¢ËÍÇëÇóµÄµØÖ·¡£
type:ÒªÇóΪStringÀàÐ͵IJÎÊý£¬ÇëÇó·½Ê½£¨post»òget£©Ä¬ÈÏΪget¡£×¢ÒâÆäËûhttpÇëÇó·½·¨£¬ÀýÈçputºÍdeleteÒ²¿ÉÒÔʹÓ㬵«½ö²¿·Öä¯ÀÀÆ÷Ö§³Ö¡£
timeout: ÒªÇóΪNumberÀàÐ͵IJÎÊý£¬ÉèÖÃÇëÇó³¬Ê±Ê±¼ä£¨ºÁÃ룩¡£´ËÉèÖý«¸²¸Ç$.ajaxSetup()·½·¨µÄÈ«¾ÖÉèÖá£
async£ºÒªÇóΪBooleanÀàÐ͵IJÎÊý£¬Ä¬ÈÏÉèÖÃΪtrue£¬ËùÓÐÇëÇó¾ùΪÒì²½ÇëÇó¡£Èç¹ûÐèÒª·¢ËÍͬ²½ÇëÇó£¬Ç뽫´ËÑ¡ÏîÉèÖÃΪfalse¡£×¢Ò⣬ͬ²½ÇëÇó½«Ëøסä¯ÀÀÆ÷£¬Óû§ÆäËû²Ù×÷±ØÐëµÈ´ýÇëÇóÍê³É²Å¿ÉÒÔÖ´ÐС£
cache£ºÒªÇóΪBooleanÀàÐ͵IJÎÊý£¬Ä¬ÈÏΪtrue£¨µ±dataTypeΪscriptʱ£¬Ä¬ÈÏΪfalse£©¡£ÉèÖÃΪfalse½«²»»á´Óä¯ÀÀÆ÷»º´æÖмÓÔØÇëÇóÐÅÏ¢¡£
data: ÒªÇóΪObject»òStringÀàÐ͵IJÎÊý£¬·¢Ë͵½·þÎñÆ÷µÄÊý¾Ý¡£Èç¹ûÒѾ²»ÊÇ×Ö·û´®£¬½«×Ô¶¯×ª»»Îª×Ö·û´®¸ñʽ¡£getÇëÇóÖн«¸½¼ÓÔÚurlºó¡£·ÀÖ¹ÕâÖÖ×Ô¶¯×ª»»£¬¿ÉÒԲ鿴processDataÑ¡Ïî¡£¶ÔÏó±ØÐëΪkey/value¸ñʽ£¬ÀýÈç{foo1:"bar1",foo2:"bar2"}ת»»Îª&foo1=bar1&foo2=bar2¡£Èç¹ûÊÇÊý×飬JQuery½«×Ô¶¯Îª²»Í¬Öµ¶ÔӦͬһ¸öÃû³Æ¡£ÀýÈç{foo:["bar1","bar2"]}ת»»Îª&foo=bar1&foo=bar2¡£
4£¬jquery ajaxÿ´Îµã»÷°´Å¥¼ÓÔØÎåÌõÐÅÏ¢
ajaxÊÇÓÃÓÚÒì²½Ìá½»Êý¾ÝµÄ£¬ÖÁÓÚ·µ»Ø¼¸ÌõÊý¾ÝÍêÈ«ÊÇÓÉ×Ô¶¨ÒåµÄ²ÎÊý¾ö¶¨µÄ¡£Áé»îµÄ´«µÝ²ÎÊýÒÔ´ïµ½ÏëÒªµÄЧ¹û¡£ $.ajax({ type: "post",//Êý¾ÝÌá½»µÄÀàÐÍ£¨post»òÕßget£© url: "abc.php",//Êý¾ÝÌá½»µÃµØÖ· data: {id:1,num:5},//Ìá½»µÄÊý¾Ý(×Ô¶¨ÒåµÄһЩºǫ́³ÌÐòÐèÒªµÄ²ÎÊý) dataType: "json",//·µ»ØµÄÊý¾ÝÀàÐÍ success: function(data){//ÇëÇó³É¹¦ºó·µÖ´Ðеķ½·¨£¨ÕâÀï´¦ÀíÌí¼ÓÎåÌõµÄÊý¾Ý dataΪ´¦ÀíÖ®ºóµÄ·µ»ØÊý¾Ý£© var str = ""; $.each(data,function(a,b){//Ñ»·±éÀú·µ»ØµÄjsonÊý¾Ý str += "µÚ"+(a+1)+"ÌõÊý¾Ý:" + b;//½«jsonÊý¾ÝÆ´½Ó³É×Ö·û´® }); $("#main").append(str)//½«Æ´½ÓºÃÊý¾Ý×·¼Óµ½idΪmainµÄ¶ÔÏóÀï })}
5£¬ajaxÔõôʵÀý»¯¡£¡£¡£²½ÖèÏêϸµã¡¢¡¢jqueryÔõôʵÏÖ°¡¡£¡£
JQueryÌṩAjaxʵÏÖ£¬²»ÐèÒª×Ô¼ºÈ¥´´½¨XMLHttpRequest¶ÔÏó¡£Ê¹ÓÃJQuery½øÐÐAjaxµ÷Óõķ½Ê½ºÜ¶à£¬¿ÉÒÔÔÚÍøÉϲé»òÕßÖ±½Ó¿´²Î¿¼Êֲᡣ×î³£Óõķ½Ê½ÊÇ£º
$.ajax({
type: "POST",
url: "some.php",
data: "name=John&location=Boston",
success: function(msg){
alert( "Data Saved: " + msg );
}
});
6£¬JqueryºÍajaxµÄ¾ßÌåÇø±ðÊÇʲô£¿
jquery ÊÇÒÔÔʼjavascriptΪ»ù´¡£¬ Ìá¸ßjavascript ¿ª·¢Ð§ÂʵÄÇáÁ¿¼¶¿â ¿ÉÒÔÀí½âΪ¶ÔÔʼjavascriptµÄ°ü×°
ajax Êǽü¼¸ÄêÐÂÆðµÄ Ò»ÖÖÒì²½¼ÓÔؼ¼Êõ ÊÇ¶Ô Ôjavascript ¼¼ÊõµÄ²¹³ä ÊÇjavascriptµÄÒ»¸ö·ÖÖ§
ËùÒÔ jquery ºÍ ajax ûÓпɱÈÐÔ¡£ jquery Ò²ÓÐ×Ô¼ºµÄajax ¿ò¼Ü ÈçÆäÖеÄ$.ajax();$.post()µÈµÈ
-------------autocompleteÊôÓÚjquery²å¼þ.
2010ÄêÍøÂçÓªÏúÆÀ±È£¬ÏÖÔÚ¹úÄÚÍøÂçÓªÏú×öµÄ×îºÃµÄÄϾ©ÐÂÓêºãÍøÂçh9
7£¬ajaxºÍjsºÍjquery ÈýÕßÓÐʲô¹Øϵ
jquery ÊÇJSµÄÒ»¸ö¿ò¼Ü£¬JSÊÇÍøÒ³µÄ½Å±¾ÓïÑÔ£¬AJAXÊÇÖ¸Ò»ÖÖ´´½¨½»»¥Ê½ÍøÒ³Ó¦ÓõÄÍøÒ³¿ª·¢¼¼Êõ¡£²Ù×÷·½·¨ÈçÏ£º 1¡¢´ò¿ªeclipse´´½¨Ò»¸öweb¹¤³ÌÏîÄ¿£¬ÔÚWebContentÏ´´½¨Îļþ¼Ðjs£¬°ÑJQueryµÄjsÎļþ·Åµ½jsÎļþ¼ÐÏ£¬²¢´´½¨index.htmlºÍdoRequest.jsp¡£ 2¡¢index.htmlÎļþÄÚÈÝÈçͼ¡£ 3¡¢doRequest.jspºÍweb.xmlÎļþÄÚÈÝÈçͼ¡£ 4¡¢¶ÔÔÉúJS°æµÄ×ö²âÊÔ£¬ÔÚindex.html¼ÓÈëÈçͼ´úÂ룬²âÊÔ½á¹ûÈçͼ¡£ 5¡¢×îºó²âÊÔÒ»ÏÂÒ³ÃæÎÞ·¨·ÃÎʵÄÇé¿ö£¬²âÊÔ½á¹ûÈçͼ£¬¾ÍÍê³ÉÁË¡£
8£¬JqueryÖг£ÓõÄAJaxµÄ·½·¨ÓÐÄļ¸¸ö
jQueryÖÐajaxµÄ4ÖÖ³£ÓÃÇëÇó·½Ê½£º
1.$.ajax()·µ»ØÆä´´½¨µÄ XMLHttpRequest ¶ÔÏó¡£
$.ajax() Ö»ÓÐÒ»¸ö²ÎÊý£º²ÎÊý key/value ¶ÔÏ󣬰üº¬¸÷ÅäÖü°»Øµ÷º¯ÊýÐÅÏ¢¡£Èç¹ûÖ¸¶¨ÁË dataType Ñ¡ÏÇëÈ·±£·þÎñÆ÷·µ»ØÕýÈ·µÄ MIME ÐÅÏ¢£¬(Èç xml ·µ»Ø "text/xml")¡£
ʵÀý£º
±£´æÊý¾Ýµ½·þÎñÆ÷£¬³É¹¦Ê±ÏÔʾÐÅÏ¢¡£
$.ajax({ type: "post", dataType: "html", url: '/Resources/GetList.ashx', data: dataurl, success: function (data) ¡¡¡¡{
if (data != "") {
$("#pager").pager({
pagenumber: pagenumber, pagecount: data.split("$$")[1],
buttonClickCallback: PageClick });
$("#anhtml").html(data.split("$$")[0]);
}
}
});
2.ͨ¹ýÔ¶³Ì HTTP GET ÇëÇóÔØÈëÐÅÏ¢¡£
ÕâÊÇÒ»¸ö¼òµ¥µÄ GET ÇëÇó¹¦ÄÜÒÔÈ¡´ú¸´ÔÓ $.ajax ¡£ÇëÇó³É¹¦Ê±¿Éµ÷Óûص÷º¯Êý
¡£Èç¹ûÐèÒªÔÚ³ö´íʱִÐк¯Êý£¬ÇëʹÓà $.ajax¡£ ʵÀý£º
$.get("test.cgi", { name: "John", time: "2pm" },
function(data){
alert("Data Loaded: " + data);
});
3. ͨ¹ýÔ¶³Ì HTTP POST ÇëÇóÔØÈëÐÅÏ¢¡£ ÕâÊÇÒ»¸ö¼òµ¥µÄ POST ÇëÇó¹¦ÄÜÒÔÈ¡´ú¸´ÔÓ $.ajax ¡£
ÇëÇó³É¹¦Ê±¿Éµ÷Óûص÷º¯Êý¡£Èç¹ûÐèÒªÔÚ³ö´íʱִÐк¯Êý£¬ÇëʹÓà $.ajax¡£
ʵÀý£º
$.post("/Resources/addfriend.ashx", { "fid": fids, "fname": fnames, "tuid": tuids, "tuname": tunames },
function (data) {
if (data == "ok") {
alert("Ìí¼Ó³É¹¦£¡");
}
}
)
4.ͨ¹ý HTTP GET ÇëÇóÔØÈë JSON Êý¾Ý¡£
ʵÀý£º
$.getJSON("api.flickr.com/services/feeds/photos_public.gne?tags=cat&tagmode=any&format=json&
jsoncallback=?£¬Ç°Ãæ¼ÓÉÏhttp://", function(data){
$.each(data.items, function(i,item){
$("").attr("src", item.media.m).appendTo("#images");
if ( i == 3 ) return false;
});
});
9£¬jQueryµÄ$ajax·½·¨ÏìÓ¦Êý¾ÝÀàÐÍÓÐÄļ¸ÖÖ
²Î¿¼ajax apiÎĵµ£ºhttp://www.w3school.com.cn/jquery/ajax_ajax.asp
•"xml": ·µ»Ø XML Îĵµ£¬¿ÉÓà jQuery ´¦Àí¡£
•"html": ·µ»Ø´¿Îı¾ HTML ÐÅÏ¢£»°üº¬µÄ script ±êÇ©»áÔÚ²åÈë dom ʱִÐС£
•"script": ·µ»Ø´¿Îı¾ JavaScript ´úÂë¡£²»»á×Ô¶¯»º´æ½á¹û¡£³ý·ÇÉèÖÃÁË "cache" ²ÎÊý¡£×¢Ò⣺ÔÚÔ¶³ÌÇëÇóʱ(²»ÔÚͬһ¸öÓòÏÂ)£¬ËùÓÐ POST ÇëÇ󶼽«×ªÎª GET ÇëÇó¡££¨ÒòΪ½«Ê¹Óà DOM µÄ script±êÇ©À´¼ÓÔØ£©
•"json": ·µ»Ø JSON Êý¾Ý ¡£
•"jsonp": JSONP ¸ñʽ¡£Ê¹Óà JSONP ÐÎʽµ÷Óú¯Êýʱ£¬Èç "myurl?callback=?" jQuery ½«×Ô¶¯Ìæ»» ? ΪÕýÈ·µÄº¯ÊýÃû£¬ÒÔÖ´Ðлص÷º¯Êý¡£
•"text": ·µ»Ø´¿Îı¾×Ö·û´®
10£¬JQueryµ÷ÓÃajax,Ôõô»ñÈ¡·µ»ØµÄ¶ÔÏóµÄij¸öÊôÐÔ
Ê×ÏÈÄãÒªÃ÷°×£¬JQueryÊÇJavaScriptµÄ·â×°£¬Ëµ°×ÁË»¹ÊÇJS£¬Ëü²»ÄܶԺǫ́µÄjava¶ÔÏó×öÈκεĴ¦Àí£¬Ö»ÓжԺǫ́ÏìÓ¦µÄ×Ö·û´®×ö´¦Àí¡£
ÄãÏëÔÚÒ³ÃæÖÐÓÃJQueryÓöÔÏóµÄ·½Ê½µ÷Óúǫ́µÄÏìÓ¦Êý¾Ý£¬Äã¾ÍµÃͨ¹ýjava·½·¨£¬°Ñ¶ÔÏóת»¯Îª×Ö·û´®Êä³öµ½¿Í»§¶Ë²ÅÐС£
½¨ÒéʹÓÃJavaת»¯¶ÔÏóÀïÃæµÄֵΪjson×Ö·û´®¸øJQuery£¬ÕâÑùÄã¾ÍÄÜÓÃÄãµÄ´úÂëÁË¡£
11£¬jqueryµÄajaxÔõô·¢ËÍͬ²½ÇëÇó
$.ajax({ url: '../api/findUser', type: "POST", data: {//data¾ÍÊDzÎÊý£¬ÊÇjson¸ñʽ userCode: '201702009', userName: 'ÕÅÈý' }, async: false,//ÕâÀï±íʾͬ²½ dataType: 'json', cache: false, success: function (args) { //ÇëÇó³É¹¦·µ»ØºóÖ´ÐеĶ¯×÷ }, error: function (args) { //ÇëÇóʧ°ÜºóÖ´ÐеĶ¯×÷ } });
12£¬ajax ÈçºÎͬ²½µ÷ÓÃ
ajaxÈçºÎͬ²½µ÷Ó㺠ֱ½ÓÔÚ$.ajax()ÖÐÉèÖÃasync: false$.ajax({ type: "POST", £¨httpÇëÇó·½Ê½£© url: "XMLServer", £¨·þÎñÆ÷¶ÎurlµØÖ·£© data: "username=" + username, £¨·¢Ë͸ø·þÎñÆ÷¶ÎµÄÊý¾Ý£© dataType: "html", £¨¸æËßJQuery·µ»ØµÄÊý¾Ý¸ñʽ£© success: callback,£¨¶¨Òå½»»¥Íê³É£¬²¢ÇÒ·þÎñÆ÷ÕýÈ··µ»ØÊý¾Ýʱµ÷ÓõĻص÷º¯Êý£© ʹÓÃ$.ajaxSetup({async: false})£¨Ê×Ñ¡£© ajaxÈçºÎͬ²½µ÷ÓõÄÑÓÉ죺 ÉèÖÃajax.post ·½·¨Í¬²½²½Ö裺 ÒªÇå³þajaxµÄ¸ñʽ¡£ ¿ØÖÆͬ²½ºÍÒì²½µÄ²ÎÊý¡£ ʹÓ÷½Ê½¡£
ÍƼöÔĶÁ
- ¡ð w3school,w3schoolºÍw3cschoolÁ½¸öÍøÕ¾ÓÐʲô¹ØϵºÍÇø±ð
- ¡ð w3c,W3CÊǸÉʲôµÄ£¿
- ¡ð w3,ÓªÑøѧÖеij£ÓÃÓ¢ÎÄËõд¼°Æ京Ò壬¹òÇó¸÷λ´ó¸ç´ó½ã£¡Ð»Ð»ºÃ
- ¡ð insert into,VB insert into µÄÓ÷¨
- ¡ð html css,CSSÊÇʲô?ºÍHTMLÓÐʲôÇø±ð?
- ¡ð jquery ajax,PCDµ¶¾ßµÄº¸½Ó·½·¨³£ÓõÄÓÐÄļ¸¸ö
- ¡ð ÍòάÍøÁªÃË,ÍòάÍøÊÇʲôÒâ˼
- ¡ð phpÊÖ²á,PHP+MySQLÍêȫѧϰÊÖ²áµÄͼÊéĿ¼
- ¡ð background-color,backgroundºÍbackground-ColorµÄÇø±ð½éÉÜ
- ¡ð cssÊÖ²á,ʲôÊÇCSSÑùʽ±í£¿
×îÐÂÎÄÕÂ
- ¡ð w3school,w3schoolºÍw3cschoolÁ½¸öÍøÕ¾ÓÐʲô¹ØϵºÍÇø±ð
- ¡ð w3c,W3CÊǸÉʲôµÄ£¿
- ¡ð w3,ÓªÑøѧÖеij£ÓÃÓ¢ÎÄËõд¼°Æ京Ò壬¹òÇó¸÷λ´ó¸ç´ó½ã£¡Ð»Ð»ºÃ
- ¡ð insert into,VB insert into µÄÓ÷¨
- ¡ð html css,CSSÊÇʲô?ºÍHTMLÓÐʲôÇø±ð?
- ¡ð jquery ajax,PCDµ¶¾ßµÄº¸½Ó·½·¨³£ÓõÄÓÐÄļ¸¸ö
- ¡ð ÍòάÍøÁªÃË,ÍòάÍøÊÇʲôÒâ˼
- ¡ð phpÊÖ²á,PHP+MySQLÍêȫѧϰÊÖ²áµÄͼÊéĿ¼
- ¡ð background-color,backgroundºÍbackground-ColorµÄÇø±ð½éÉÜ
- ¡ð cssÊÖ²á,ʲôÊÇCSSÑùʽ±í£¿