ËÄ¡¢³ÌÒ§½ð——JavaScript»ù´¡
Ò»¡¢Ç°ÑÔ
Ajax£¬Òì²½JavaScriptºÍXML£¬Ç°ÃæÒѾ½âÊ͹ý£¬ËùÒÔAjaxµÄѧϰ»¹°üº¬JavaScriptºÍXML£¬ÕâÀïÎÒÃÇÏÈ¿´JavaScript£¬¶øJavaScriptʵ¼ÊÉÏÓÖÊÇ°üº¬JavaScriptÓï·¨ºÍHTML DOM¼´Îĵµ¶ÔÏóÄ£Ð͵ģ¬½ÓÏÂÀ´»á·Ö±ð½éÉÜ¡£
JavaScript½Ì³Ì²Î¿¼µØÖ·£ºhttp://www.w3school.com.cn/js/index.asp
¶þ¡¢JavaScript»ù´¡
1) Ò³ÃæÉϵÄJavaScript±ØÐë°üº¬ÔÚ<script>Óë</script>Ö®¼ä£¬ÒÔÏòä¯ÀÀÆ÷˵Ã÷ÕâÊÇJavaScript
2) ±äÁ¿Óë±äÁ¿ÉùÃ÷£ºJavaScriptÊÇÈõÀàÐÍÓïÑÔ£¬²»ÐèÒªÉùÃ÷±äÁ¿µÄÀàÐÍ£¬ËùÓеıäÁ¿¶¼¿ÉÒÔͨ¹ývarÉùÃ÷·ûÀ´ÉùÃ÷£¬È磺var x = 5; var y = “good”;µÈµÈ
3) ²åÈëÌØÊâ×Ö·ûÐèʹÓÃתÒå×Ö·û“\”(бÏß)£¬Èç\’, \”, \nµÈµÈ
4) JavaScript¶Ô´óСдÃô¸Ð
Èý¡¢JavaScript¶ÔÏó
1) String¶ÔÏó
(1) length£º×Ö·û´®³¤¶È£¬Àý£ºtxt.length
(2) match() ·½·¨£º²éÕÒ×Ö·û´®ÖÐÌض¨µÄ×Ö·û£¬²¢ÇÒÈç¹ûÕÒµ½µÄ»°£¬Ôò·µ»ØÕâ¸ö×Ö·û£¬Àý£ºstr.match("world")
(3) indexOf() ·½·¨£º¶¨Î»×Ö·û´®ÖÐijһ¸öÖ¸¶¨µÄ×Ö·ûÊ״γöÏÖµÄλÖã¬Èç¹ûûÓÐÔò·µ»Ø-1£¬Àý£ºstr.indexOf("Hello")
(4) replace() ·½·¨£ºÔÚ×Ö·û´®ÖÐÓÃijЩ×Ö·ûÌæ»»ÁíһЩ×Ö·û£¬Àý£ºstr.replace(/Microsoft/,"W3School")
(5) toUpperCase()·½·¨£º½«×Ö·û´®×ª»»Îª´óд£¬Àý£ºtxt.toUpperCase()
(6) split(·Ö¸î×Ö·û) ·½·¨ £º½«×Ö·û´®°´·Ö¸î×Ö·û·Ö¸î£¬·µ»ØÊý×é
2) ÈÕÆÚ¶ÔÏó
(1) Date()£º·µ»Øµ±Ç°ÈÕÆÚºÍʱ¼ä£¬Àý£ºvar x = new Date();
(2) var today=new Date()
(3) var h=today.getHours()
(4) var m=today.getMinutes()
(5) var s=today.getSeconds()
3) Êý×é
(1) Var list = new Array();£ºÉùÃ÷Êý×é
(2) List[x] = “value”;£ºÎªÊý×鸳ֵ£¬¸³ÖµÀàÐÍÎÞÒªÇó
(3) For … inÑ»·Êý×飺ÕâÑ
Ïà¹ØÎĵµ£º
scrollHeight: »ñÈ¡¶ÔÏóµÄ¹ö¶¯¸ß¶È¡£
scrollLeft:ÉèÖûò»ñȡλÓÚ¶ÔÏó×ó±ß½çºÍ´°¿ÚÖÐÄ¿Ç°¿É¼ûÄÚÈݵÄ×î×ó¶ËÖ®¼äµÄ¾àÀë
scrollTop:ÉèÖûò»ñȡλÓÚ¶ÔÏó×¶ËºÍ´°¿ÚÖпɼûÄÚÈݵÄ×¶ËÖ®¼äµÄ¾àÀë
scrollWidth:»ñÈ¡¶ÔÏóµÄ¹ö¶¯¿í¶È
offsetHeight:»ñÈ¡¶ÔÏóÏà¶ÔÓÚ°æÃæ»òÓɸ¸×ø±ê offsetParent ÊôÐÔÖ¸¶¨µÄ¸¸×ø±êµÄ¸ß¶È
offsetL ......
À´×Ô£ºhttp://www.tripwiremagazine.com/tools/developer-toolbox/top-10-javascript-frameworks-by-google.html
Wed, Nov 11, 2009
Development
, Javascript
, Tools
JavaScript – an indispensable part for developing websites and web
pages, whether th ......
±äÁ¿µÄÖ÷Òª×÷ÓÃÊÇ´æÈ¡Êý¾Ý¡¢Ìṩ´æ·ÅÐÅÏ¢µÄÈÝÆ÷¡£¶ÔÓÚ±äÁ¿±ØÐëÃ÷È·±äÁ¿µÄÃüÃû¡¢±äÁ¿µÄÀàÐÍ¡¢±äÁ¿µÄÉùÃ÷¼°±äÁ¿µÄ×÷ÓÃÓò¡£
¡¡±äÁ¿µÄÃüÃû
JavaScriptÖеıäÁ¿ÃüÃûͬÆäËü¼ÆËã»úÓïÑԷdz£ÏàËÆ£¬ÕâÀïҪעÒâÒÔÏÂÁ½µã£º
&nbs ......
Google ÅÅÃûÖÐµÄ 10 ¸ö×îÖøÃûµÄ JavaScript ¿â ÊÕ²Ø
JavaScript ÊÇ Web ¿ª·¢ÓëÉè¼ÆÖв»¿É»òȱµÄ¶«Î÷£¬²»¹ÜÊÇÒ»¸ö¼òµ¥µÄÍøÒ³»¹ÊÇÒ»¸öרҵµÄÕ¾µã£¬Ò²²»¹ÜÄãÊǸßÊÖ»¹ÊDzËÄñ£¬Èç½ñ JavaScript ¿âÔ½À´Ô½Ç¿´ó£¬¿ÉÒÔʤÈÎÐí¶à¸´ÔӵŤ×÷£¬È»¶øͬʱ£¬ÈËÃÇÔÚÖÚ¶à JavaScript ¿âÃæÇ°ÓÖ¾õµÃÎÞËùÊÊ´Ó£¬±¾ÎÄ£¬ÎÒÃǽ«Ê¹Óà G ......
ÆäËüÃæÏò¶ÔÏóµÄÓïÑÔÈçJAVAµÄÒ»¸ö³£¼ûÌØÐÔÊÇ£¬¸ù¾Ý´«ÈëµÄ²»Í¬ÊýÁ¿»òÀàÐ͵ģ¬Í¨¹ýÖØÔØ(overload) À´·¢»Ó²»Í¬µÄ¹¦Ó᣾¡¹ÜÕâ¸öÌØÐÔÔÚJavaScriptÖв¢Ã»ÓÐÖ±½ÓÖ§³Ö£¬Ò²Óкܶà°ì·¨Äܹ»ÊµÏÖ¡£
º¯ÊýÖØÔØ£¨function overloading£©±ØÐëÒÀÀµÁ½¼þÊÂÇ飺Åжϴ«Èë²ÎÊýµÄÊýÁ¿µÄÄÜÁ¦ºÍÅжϴ«Èë²ÎÊýÀàÐ͵ÄÄÜÁ¦¡£
JavaScript掅 ......