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

JavascriptÃæÏò¶ÔÏó±à³Ì£¨Èý£©£º·Çº¯Êý¶ÔÏóµÄ¼Ì³Ð


×òÌ죬ÎÒ±¾À´´òË㣬°ÑÕâ¸ö»°Ìâ½áÊøÁË¡£
µ«ÊÇ£¬Ð´µ½Ò»°ëµÄʱºò£¬ÎÒͻȻÒâʶµ½£¬JavascriptµÄ¼Ì³ÐÓÐÁ½ÖÖ¡£Ò»ÖÖÊÇ»ùÓÚ"º¯Êý¶ÔÏó"µÄ¼Ì³Ð£¬Ò²¾ÍÊÇÒ»¸öfunctionÈ¥¼Ì³ÐÁíÍâÒ»¸öfunction£¬Õâ¸öÎÒÒѾ­ÔÚ×òÌì½éÉܹýÁË¡£
ÁíÒ»ÖÖÔòÊÇ»ùÓÚ"·Çº¯Êý¶ÔÏó"µÄ¼Ì³Ð£¬²»Éæ¼°function¡£ËüµÄ×ö·¨ÓëÇ°Ò»ÖÖÇé¿öÍêÈ«²»Í¬¡£
Ò»¡¢Ê²Ã´ÊÇ"·Çº¯Êý¶ÔÏó"µÄ¼Ì³Ð£¿
±ÈÈ磬ÏÖÔÚÓÐÒ»¸ö¶ÔÏ󣬽Ð×ö"ÖйúÈË"¡£
¡¡¡¡var Chinese = {
¡¡¡¡¡¡¡¡nation:'Öйú'
¡¡¡¡};
»¹ÓÐÒ»¸ö¶ÔÏ󣬽Ð×ö"Ò½Éú"¡£
¡¡¡¡var Doctor ={
¡¡¡¡¡¡¡¡career:'Ò½Éú'
¡¡¡¡}
ÇëÎÊ£¬ÎÒÔõÑù²ÅÄÜÈÃ"Ò½Éú"È¥¼Ì³Ð"ÖйúÈË"£¬Ò²¾ÍÊÇ˵£¬ÎÒÔõÑù²ÅÄÜÉú³ÉÒ»¸ö"ÖйúÒ½Éú"µÄ¶ÔÏó£¿
¶þ¡¢object()·½·¨
json¸ñʽµÄ·¢Ã÷ÈËDouglas Crockford£¬Ìá³öÁËÒ»¸öobject()º¯Êý£¬¿ÉÒÔ×öµ½ÕâÒ»µã¡£
¡¡¡¡function object(o) {
¡¡¡¡¡¡¡¡function F() {}
¡¡¡¡¡¡¡¡F.prototype = o;
¡¡¡¡¡¡¡¡return new F();
¡¡¡¡}
Õâ¸öobject()º¯Êý£¬Æäʵֻ×öÒ»¼þÊ£¬¾ÍÊÇ°Ñ×Ó¶ÔÏóµÄprototypeÊôÐÔ£¬Ö¸Ïò¸¸¶ÔÏ󣬴ӶøʹµÃ×Ó¶ÔÏóÓ븸¶ÔÏóÁ¬ÔÚÒ»Æð¡£
ʹÓõÄʱºò£¬µÚÒ»²½ÏÈÔÚ¸¸¶ÔÏóµÄ»ù´¡ÉÏ£¬Éú³É×Ó¶ÔÏó£º
¡¡¡¡var Doctor = object(Chinese);
È»ºó£¬ÔÙ¼ÓÉÏ×Ó¶ÔÏó±¾ÉíµÄÊôÐÔ£º
¡¡¡¡Doctor.career = 'Ò½Éú';
Õâʱ£¬×Ó¶ÔÏóÒѾ­¼Ì³ÐÁ˸¸¶ÔÏóµÄÊôÐÔÁË¡£
¡¡¡¡alert(Doctor.nation); //Öйú
Èý¡¢Ç³¿½±´
³ýÁËʹÓÃ"prototypeÁ´"ÒÔÍ⣬»¹ÓÐÁíÒ»ÖÖ˼·£º°Ñ¸¸¶ÔÏóµÄÊôÐÔ£¬È«²¿¿½±´¸ø×Ó¶ÔÏó£¬Ò²ÄÜʵÏּ̳С£
ÏÂÃæÕâ¸öº¯Êý£¬¾ÍÊÇÔÚ×ö¿½±´£º
¡¡¡¡function extendCopy(p) {
¡¡¡¡¡¡¡¡var c = {};
¡¡¡¡¡¡¡¡for (var i in p) {
¡¡¡¡¡¡¡¡¡¡¡¡c[i] = p[i];
¡¡¡¡¡¡¡¡}
¡¡¡¡¡¡¡¡c.uber = p;
¡¡¡¡¡¡¡¡return c;
¡¡¡¡}
ʹÓõÄʱºò£¬ÕâÑùд£º
¡¡¡¡var Doctor = extendCopy(Chinese);
¡¡¡¡Doctor.career = 'Ò½Éú';
¡¡¡¡alert(Doctor.nation); // Öйú
µ«ÊÇ£¬ÕâÑùµÄ¿½±´ÓÐÒ»¸öÎÊÌâ¡£ÄǾÍÊÇ£¬Èç¹û¸¸¶ÔÏóµÄÊôÐÔµÈÓÚÊý×é»òÁíÒ»¸ö¶ÔÏó£¬ÄÇôʵ¼ÊÉÏ£¬×Ó¶ÔÏó»ñµÃµÄÖ»ÊÇÒ»¸öÄÚ´æµØÖ·£¬¶ø²»ÊÇÕæÕý¿½±´£¬Òò´Ë´æÔÚ¸¸¶ÔÏ󱻴۸ĵĿÉÄÜ¡£
Çë¿´£¬ÏÖÔÚ¸øChineseÌí¼ÓÒ»¸ö"³öÉúµØ"ÊôÐÔ£¬ËüµÄÖµÊÇÒ»¸öÊý×é¡£
¡¡¡¡Chinese.birthPlaces = ['±±¾©','ÉϺ£','Ïã¸Û'];
ͨ¹ýextendCopy()º¯Êý£¬Doctor¼Ì³ÐÁËChinese¡£
¡¡¡¡var Doctor = extendCopy(Chinese);
È»ºó£¬ÎÒÃÇΪDoctorµÄ"³öÉúµØ"Ìí¼ÓÒ»¸ö³ÇÊУº
¡¡¡¡Doctor.birthPlaces.push('ÏÃÃÅ');
·¢ÉúÁËʲôÊ£¿ChineseµÄ"³öÉúµ


Ïà¹ØÎĵµ£º

javascriptЧÂʾ­Ñé̸(Ò»)

±¾ÎÄÖ÷ÒªÊdzöÓÚÓÐÅóÓÑʹÓÃÎÒÔ­À´Ð´µÄautocompleteµÄJS¿Ø¼þ¡£µ±Êý¾ÝÁ¿´óµÄʱºò£¬»á³öÏÖЧÂʼ«ÆäÂýµÄÇé¿ö£¬ÎÒÔÚÕâ¶Îʱ¼ä×ö³öµÄһЩ²âÊÔÒ²¼°Ò»Ð©¾­Ñ飬Óë´ó¼Ò·ÖÏí£¬Èç¹ûÓдíµÄµØ·½£¬»¹ÇëÖ¸³ö¡£
¾­¹ý²âÊÔ£¬ÎÒÃǻᷢÏÖÈçϵÄÇé¿ö»òÕß˵µÄ½áÂÛ£¬Èç¹ûÄúµÄ²âÊÔ½á¹ûÓëÎҵIJ»·û£¬Çë˵Ã÷Ô­Òò£¬ÒÔ±ãÏ໥ѧϰ¡£
1£©µ±Ò»¸ö½Ï´óµÄHTML×Ö· ......

ѹËõjavascriptºÍcss


This document is for establishing build standard for JavaScript and CSS compression
The objective for this document is to establish a companywide JavaScript and CSS compression standard that can be shared crossing multiple SharePoint product development projects. This is the first draft
Overview ......

javascript this Ó÷¨

Ô­ÎĵØÖ·£ºhttp://www.cnblogs.com/daniel-shen/archive/2006/07/12/449280.html
javascript ÖÐthis µÄÓ÷¨:
1.<div onclick="// ¿ÉÒÔÔÚÀïÃæʹÓÃthis">division element</div> this Ö¸Ïòdiv
2.    <div id="elmtDiv">division element</div>
    &nbs ......

Á½¸öЧ¹ûÂùºÃµÄjavascript»ÃµÆƬ£¨Jquery slider£©

http://css-tricks.com/creating-a-slick-auto-playing-featured-content-slider/
demo£ºhttp://css-tricks.com/examples/FeaturedContentSlider/
Featured Content Slider Using jQuery
http://demo.webdeveloperplus.com/featured-content-slider/ ......

JavaScript ÖеÄÄÚ´æй©ÎÊÌâ

ÓÉÓÚ×î½ü×Ô¼ºµÄFireFox¾­³£³öÏÖµ÷ÓÃJS½Å±¾Ê±Ôì³ÉÄÚ´æÒç³ö¶ø²úÉú¼ÙËÀµÄÏÖÏ󣬽ñÌì¸ÕºÃÓÐÐÒ¿´µÄIBMÍøÕ¾ÀïÕâƪÎÄÕ£¬¶ø×Ô¼ºÏÖÔÚÓÖÔÚѧϰJS£¬¿´ÁËÒÔºó¾õµÃдµÄ·Ç³£²»´í£¬Ìáµ½Á˺ܶàÎÒÃÇƽʱÔÚ±àдJS´úÂëʱÈÝÒ×Ôì³ÉµÄ´íÎó¡£ÏÖ½«´ËÎÄ·ÖÏí¸ø´ó¼Ò£¡
Internet Explorer ºÍ Mozilla Firefox ÊÇÁ½¸öÓë JavaScript ÖеÄÄÚ´æй©ÁªÏµ×îÎ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ