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

2009 12 25´«ÖDz¥¿Í——JavaScript£ºJQuery


 
ʹÓùýAJAX¼¼ÊõµÄÈ˶¼ÖªµÀ´óÃû¶¦¶¦µÄJQuery¡£ËäÈ»ÎÒÀ´Ñ§Ï°Ö®Ç°Óп´¹ýAJAXµÄÊÓƵ£¬µ«ÄÇʱ¶ÔWEBÓ¦ÓÃÕâ¸ö¶«Î÷»¹±È½ÏÄ£ºý£¬²»Çå³þHTML¡¢JSPÓëServletÊÇÔõô¹¤×÷µÄ£¬ÉõÖÁ²»ÖªµÀJQuery°ü×°µÄÊÇʲô¶«Î÷¡£½ñÈÕµÄѧϰÔÙ½áºÏ×òÌìµÄJavaScriptDOMµÄÄÚÈÝ£¬ÈÃÎÒ¶Ô´ËÊ®·ÖÇåÎú¡£JQueryÔ­Ôò£º“write less, do more.”£¬Õâ¾ä»°Òѳä·Ö˵Ã÷Ëü¶Ô¼ò»¯Ê¹ÓÃJavaScriptDOM±à³ÌµÄ¹¦Á¦£¡
 
         Ã¿Î»ÀÏʦ¶¼ÓÐ×Ô¼ºµÄ½Ìѧ·½Ê½£¬¿ÉÄܸù¾Ý½ÌÊÚµÄÄÚÈݵIJ»Í¬½Ìѧ·½Ê½Ò²ÓÐÇá΢µÄ±ä»¯¡£ÀÏÙ¡ÊÇһλ·Ç³£Óо­ÑéµÄÈí¼þ½Ìʦ£¬Ö®Ç°ËûÔÚ´óÁ¬µÄÈí¼þ¹«Ë¾×öÅàѵ¡£¾­¹ý¶àÄêµÄ×ܽᣬËûÒѾ­ÓÐ×Ô¼ºÒ»Ì׳ÉÊìµÄ½Ìѧ·½Ê½¡£Õâ¸ö·½Ê½ÈÃÎÒÊ®·Öϲ»¶£¡ÖÁÓÚÊÇʲô·½Ê½£¬Äã×Ô¼ºÀ´ÌåÑé°É£¡¹þ¹þ~~
 
         ´ÓѧϰJavaWEB¡¢Struts1µ½ÏÖÔÚµÄJavaScript£¬ÎÒÒѾ­ÕÒµ½ÁËWEBÓ¦Óÿª·¢µÄºËÐÄ——MVC¡£Êǵģ¬¾ÍÊÇMVC¡£ÆäʵMVCÓ¦¸ÃÊǸù¾ÝWEBµÄºËÐı»´´Ôì³öÀ´µÄģʽ£¬ÄѵÀ²»ÊÇÂð£¡ÕâÒ»ÕûÌ×¹¤¾ß£¬¾ÍÊÇ·Ö±ð¶ÔÊÓͼ²ã¡¢¿ØÖƲãºÍÊý¾ÝÄ£ÐͲãµÄ²Ù×÷¡£ËƺõÏÖÔÚ²ÅÕÒµ½ÁËһЩ¸Ð¾õ£¬ÒòΪÒÔǰѧϰservletʱ£¬ÖªµÀËü¿ÉÒÔ´¦ÀíÓû§µÄÇëÇó£¬ÀÏʦ½²Ê²Ã´¾Íѧϰʲô¡£µ«ÏÖÔÚÓÐ˼ÏëÁË£¬ÀÏʦÄãÎÞÂÛ½²Ê²Ã´£¬ÎÒ¶¼ÖªµÀËüÓ¦¸ÃÓÃÔÚÄÄÒ»²ã£¬ÓÐʲôÓÃ;£¬ÕâÑùÌá¸ßÁËÎÒµÄѧϰЧÂÊ¡£ÕâÊÇÒ»¸ö·Ç³£ºÃµÄ³É³¤£¡¶ÔÒÔºóµÄ³É³¤´óÓаïÖú¡£
 
         ½ÓÏÂÀ´ÕâЩÁéÉ¢µÄ֪ʶ¾Í²»¶àÁË£¬È»ºó¾Í¿ªÊ¼×öÏîÄ¿ÁË¡£Á½¸ö×Ö£¬¿ì¡¢Ë¬£¡Ok£¬¿ªÊ¼ÕûÀíѧϰÄÚÈÝ¡£
 
Ò»¡¢JQueryÓëJavaScript
1.JavaScript¿â
         Ê¹ÓùýJavaScriptDOMµÄÈ˶¼Ó¦¸ÃÖªµÀ£¨±ÈÈç×òÌìµÄÁ·Ï°£©£¬Ê¹ÓÃJSDOM½øÐÐÒ³ÃæµÄ²Ù×÷ÊÇÊ®·ÖÂé·³µÄ¡£±ÈÈç»ñÈ¡¡¢Ð޸ļ°Ìí¼Ó×Ó½ÚµãµÈÕâЩ²Ù×÷¡£Èç¹û²Ù×÷Ò»¸ö¸´ÔÓµÄÒ³ÃæÄØ£¿Ok£¬JavaScript¿âÒò´Ëµ®ÉúÁË¡£
 
         Ä¿Ç°±È½Ï³£¼ûµÄJavaScript¿âÓУº
 
2.JQuery¼ò½é
JQueryÊǼÌPrototypeÖ®ºóÓÖÒ»¸öÓÅÐãµÄJavaScript¿â¡£
JQueryÀíÄwrite less , do more.
JQueryÓÅÊÆ£ºÇáÁ¿¼¶¡¢Ç¿´óµÄÑ¡ÔñÆ÷¡¢³öÉ«µÄ DOM ²Ù×÷µÄ·â×°¡¢¿É¿¿µÄʼþ´¦Àí»úÖÆ¡¢ÍêÉƵÄAjax¡¢³öÉ«µÄä¯ÀÀÆ÷¼æÈÝÐÔ¡¢Á´Ê½²Ù×÷·½Ê½……¡£
 
¶þ¡¢JQuery¶ÔÏó


Ïà¹ØÎĵµ£º

´«ÖDz¥¿Í JavaScript DOM¼ÓÇ¿

ÉÏÁËÒ»ÌìµÄ¿Î,ºÜÀÛ,²»¹ýÕæµÄºÜ³äʵ.±È×Ô¼ºÑ§µÄЧÂÊÒª¸ßºÜ¶à,¶Ô¼¼ÊõµÄÀí½âÒ²Ìá¸ßÁ˲»ÉÙ.¶Ô×ܽáÓгäÂúÁËÐÅÐÄ,¸Ð¾õ×Ô¼ºÁ½¸ö°ëÔºóÒ»¶¨ÄÜÕÒµ½Ò»¸öÎåǧ¿éÒÔÉϵŤ×÷.¹þ¹þ!½ñÌì½²µÄÊÇJavaScriptµÄÓ¦ÓÃ.Ö÷ÒªÊÇÔÚÏîÄ¿ºÍ¹¤×÷Öо­³£Ê¹Óõ½µÄ¹¦ÄÜʵÏÖ.ÀÏʦ¶ÔJavaScriptµÄ×ܽáºÍÔËÓúÜÈ«ÃæºÍʵÓÃ.Ïȼòµ¥½éÉܼ¸¾ä½ÌÎÒJavaScriptµÄÀÏʦ,Ù¡ ......

JavaScriptµÄCookies

ʹÓà Cookies¡¡¡¡ÎÒÃÇÒѾ­ÖªµÀ£¬ÔÚ document ¶ÔÏóÖÐÓÐÒ»¸ö cookie ÊôÐÔ¡£µ«ÊÇ Cookie ÓÖÊÇʲô£¿“ijЩ Web
Õ¾µãÔÚÄúµÄÓ²ÅÌÉÏÓúÜСµÄÎı¾Îļþ´æ´¢ÁËһЩÐÅÏ¢£¬ÕâЩÎļþ¾Í³ÆΪ Cookie¡£”—— MSIE °ïÖú¡£Ò»°ãÀ´Ëµ£¬Cookies ÊÇ CGI
»òÀàËÆ£¬±È HTML ¸ß¼¶µÄÎļþ¡¢³ÌÐòµÈ´´½¨µÄ£¬µ«ÊÇ JavaScript Ò²Ìá¹ ......

javascript ¶ÁÈ¡£¬ÉèÖÃcookies

function SetCookie(name,value){
var argv=SetCookie.arguments;
var argc=SetCookie.arguments.length;
var expires=(2<argc)?argv[2]:null;
var path=(3<argc)?argv[3]:null;
var domain=(4<argc)?argv[4]:null;
var secure=(5<argc)?argv[5]:false;
document.cookie=name+"="+escape(valu ......

ʹÓÃJavascriptͬʱÌá½»¶à¸öWeb±íµ¥µÄ·½·¨


1ÎÊÌâÀ´×ÔһλÍøÓѵÄÌáÎÊ£º
webÒ³ÃæÀïÓжà¸ö±íµ¥£¬Ã¿¸ö±íµ¥¶ÔÓ¦×ÅijһÀàÊý¾Ý²Ù×÷¡£
±ÈÈçÒ»¸öÏêϸµÄ¼òÀúÐÅÏ¢Ò³Ãæ·Ö 1¡¢¸öÈË×ÊÁÏ 2¡¢¹¤×÷¾­Ñé 3¡¢ÏîÄ¿¾­Ñé 4¡¢ÆäËûÐÅÏ¢ 4¸ö±íµ¥¡£
Ò»°ãµÄÐèÇóÊÇÔÊÐíÓû§µ¥¶ÀÌá½»ÆäÖÐÈκÎÒ»¸ö±íµ¥µ½ÏÂÒ»¸öÒ³Ãæ½øÐÐÐ޸IJÙ×÷£¨Ò²¾ÍÊÇ˵ҳÃæÓÐ4¸ö²»Í¬µÄÐ޸İ´Å¥,µã»÷Äĸö°´Å¥ÔòÖ»Ìύijһ¸ö±í ......

¡¶JavaScript Õ÷;¡· ¶Áºó¸Ð

ÎÒÊÇÒ»Ãû³ÌÐòÔ±£¬Ê¹ÓÃJavaÓïÑÔ½øÐйÜÀíÈí¼þ¿ª·¢¹¤×÷¡£ÓÐÒ»´Î¿ª·¢ÏîÄ¿ÖÐʹÓÃJavaScriptÀ´·á¸»Óû§ÌåÑéЧ¹û£¬ÌصØÈÏÕæµÄѧϰÁËһϣ¬´Ó´Ë¶ÔJavaScript²úÉúÁËŨºñµÄÐËȤ¡£Óлú»á²Î¼ÓÁËÓɵç×Ó¹¤Òµ³ö°æÉç·É˼¹«Ë¾¾Ù°ìµÄ¡¶JavaScriptÕ÷;¡·¶Áºó¸ÐÓн±ÕÙ¼¯»î¶¯£¬»ñµÃÔùÊéѧϰ¡£ÓÉÓÚ±¾ÈËÎÄѧˮƽÓÐÏÞ£¬´Ë¶Áºó¸ÐµÄÓôʲ»µ±Ö®´¦»¹Íû¶à ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ