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

javascript¿ò¼ÜÖ®¼Ì³Ð»úÖÆ

´óÒ»µãµÄ¿ò¼Ü¶¼ÓÐÕâ¸ö¶«Î÷¡£PrototypeÔ­À´µÄ¼Ì³Ð»úÖƷdz£Èõ£¬ÎªÁËÓëmootools¶Ô¿¹Ò²Ç¿»¯ÁËÕâÒ»·½Ãæ¡£ÂҪÓÃÔ­Ðͼ̳ÐÀ´Ä£·ÂÀà¼Ì³Ð£¬¶¼»ù±¾´æÔÚÒ»¸ö¿Ë¡º¯Êý¡£°Ñ¸¸ÀàµÄÔ­ÐÍÊôÐÔ¸´ÖƵ½×ÓÀàÉÏÈ¥¡£ÀíÄîµÄ¶«Î÷ÔÝʱÕâô¶à£¬¶¯ÊÖʵ¼ùÒ»ÏÂ×îʵ¼Ê¡£ÎÒÃÇÉè¼ÆÒ»¸öÊý×éÀ࣬ӵÓÐÔ­ÉúÊý×éµÄÄÜÁ¦ÓëÐÂÀ©Õ¹µÄÄÜÁ¦¡£

var isNumber = function(n){
return typeof n === 'number' && isFinite(n);
}
var vArray = function(){
if(arguments.length == 0){
return [];
}else if(arguments.length == 1 && isNumber(arguments[0])){
return new Array(arguments[0]);
}else if(arguments.length > 1){
return Array.prototype.slice.apply(arguments);
}
}
var a = vArray();
alert(a);
var b = vArray(7);
alert(b);
var c = vArray(1,3,"˾ͽÕýÃÀ",true);
alert(c);

ÔËÐдúÂë
ºÜÏÔÈ»ÕâÊǹ¤³§·½·¨£¬Éú³ÉµÄÔ­ÉúÊý×飬Èç¹ûÒªÀ©Õ¹¶ø²»ÎÛȾԭÉúÊý×é¾ÍÓÖÒªÔÙ¼ÓÒ»ÖØ°ü×°¡£ÎÒÃÇ¿´¼Ì³ÐÊÇÔõÑùʵÏֵġ£ÕâÉæ¼°µ½Á½¸öÀ࣬ԭÉúÊý×éÀàÓëÐÂÊý×éÀà¡£ÏÈ¿´´úÂ룺

var Parent = function(){};
Parent.prototype = Array.prototype;
var Array2 = function(){};
Array2.prototype = new Parent;
Array2.prototype.newMethod = function(){
return "newMethod";
};
Array2.prototype.constructor = Array2;
var a = new Array2("dd",4);
alert(a.newMethod)
var b = new Array("dd",4);
alert(b.newMethod)

ÔËÐдúÂë
ÓÉÓÚjavascriptµÄÔ­ÐÍÁ´µÄ¹Øϵ£¬ÎÒÃDz»ÄÜÖ±½Óvar Array2 = Array;var a = new Array2£»ÕâÑùÒ»µ©´ÓArray2µÄÔ­ÐÍÌí¼Óз½·¨£¨Ìí¼Ó·½·¨¶¼½¨ÒéÍùÔ­ÐÍÀï¼Ó£¬²»½¨Òé×ö³ÉÀà·½·¨£©Ê±£¬ArrayµÄÔ­ÐÍÒ²±»¼ÓÉÏÁË£¬ÒòΪËüÃÇÊÇÔÚͬһÌõ´¬ÉÏ¡£ÎÒÃDZØÐë¶Ï¿ªËüÃÇ¡£ÓÚÊÇÎÒÃÇÐèÒªÒ»¸öParentº¯Êý×öÇŽӡ£ÎÒÃÇ¿ÉÒÔ˵ArrayΪĿ±ê¸¸À࣬ParentΪÕæÕý¸¸Àà¡£ÏÈ°ÑÄ¿±ê¸¸ÀàµÄÔ­Ð͸³¸øParentµÄÔ­ÐÍ£¬ÕâÑùParent¾ÍÓµÓÐÆäËùÓй«¿ªµÄ·½·¨£¬È»ºóÎÒÃÇÔÙ°ÑÕâЩ·½·¨¸³¸øArray2¡£µ«ÕâʱArray2µÄʵÀýµÄconstructor ÈÔΪԭÉúµÄÊý×飬ÎÒÃÇÒªÐÞÕýһϣ¬Ò²¾ÍÊÇ°ÑËüµÄÔ­ÐÍÉϵÄconstructor


Ïà¹ØÎĵµ£º

JavaScript ͼÏñµØͼ

 
ͼÏñµØͼָµÄÊÇ´øÓпɵã»÷ÇøÓòµÄͼÏñ¡£
ʵÀý
¼òµ¥µÄ HTML ͼÏñÓ³Éä
±¾ÀýÑÝʾһ·ùûÓÐÌí¼Ó JavaScript µÄͼÏñÓ³Éä¡£
Ìí¼ÓÁË JavaScript µÄͼÏñÓ³Éä
±¾ÀýÑÝʾһ·ùÌí¼ÓÁË JavaScript µÄͼÏñÓ³É䣬µ±Êó±ê¸¡¶¯ÓÚij¸öÈȵãÉÏʱ£¬»áµ÷Óà JavaScript º¯ÊýÀ´ÏÔʾÈȵãËù¶ÔÓ¦µÄÐÇÇòµÄ¼ò½é¡£
JavaScript ͼÏñµØͼ
ÎÒÃÇÒѾ ......

ÓÃJavascriptÖÆ×÷Õ¾ÄÚËÑË÷Æ÷

ÓÃJavaScript×öµÄÕ¾ÄÚËÑË÷²»½ö±à³ÌʵÏÖ¡¢Î¬»¤ÆðÀ´ºÜ¼òµ¥£¬¶øÇÒËüÄÜÔÚ¿Í»§¶Ëä¯ÀÀÆ÷Ö±½ÓÖ´ÐУ¬ÎÞÐë·þÎñÆ÷µÄÖ§³Ö£¬Ò²¿ÉÒÔÊ¡È¥ÉêÇëÓнű¾Ö´ÐÐȨÏÞ¿Õ¼äµÄÂé·³¡£ËùÒÔ£¬Ö»ÒªÄãÔ¸Ò⶯ÊÖ£¬ÓиöÈËÖ÷Ò³¾ÍÄÜÓÐ×Ô¼ºµÄÕ¾ÄÚËÑË÷¡£ÏÂÃæÈÃÎÒÃǹ²Í¬À´×öÒ»¸ö»ùÓÚJavaScriptµÄÕ¾ÄÚËÑË÷µÄ½Å±¾£¬¿É²»ÒªÐ¡¿´Ëü£¬×öÍêÁËÄã¾ÍÖªµÀËüµÄºÃ´¦ÁË¡£
  ......

JavaScript »ñÈ¡¿Í»§¶Ë¼ÆËã»úÓ²¼þ¼°ÏµÍ³ÐÅÏ¢

JavaScript »ñÈ¡¿Í»§¶Ë¼ÆËã»úÓ²¼þ¼°ÏµÍ³ÐÅÏ¢
ͨ¹ýWMIÀ´ÊµÏÖ»ñÈ¡¿Í»§¶Ë¼ÆËã»úÓ²¼þ¼°ÏµÍ³ÐÅÏ¢:
1//ϵͳÐÅÏ¢»ñÈ¡
2function getSysInfo(){
3 var locator = new ActiveXObject ("WbemScripting.SWbemLocator");
4 var service = locator.ConnectServer(".");
5 //CPUÐÅÏ¢
6 var cpu = new Enu ......

JavaScript ¶à¼¶²Ëµ¥

 ÊµÏÖЧ¹û£º
ÒýÈëJSºÍCSSÎļþ£º
<mce:script type='text/javascript' src="dropdown/jquery-1.2.3.min.js" mce_src="dropdown/jquery-1.2.3.min.js"></mce:script>
<mce:script type='text/javascript' src="dropdown/menu.js" mce_src="dropdown/menu.js"></mce:script>
<link rel=" ......

JavaScript Array Note

/*
ÓÉÓÚjavascriptÊÇÒ»ÖÖÎÞÀàÐÍÓïÑÔ,ËùÒÔÒ»¸öÊý×éµÄÔªËØ¿ÉÒÔ¾ßÓÐÈÎÒâµÄÊý¾ÝÀàÐÍ,ͬһ¸öÊý×éµÄ²»Í¬ÔªËØ
¿ÉÒÔ¾ßÓв»Í¬µÄÀàÐÍ,Êý×éµÄÔªËØÉèÖÿÉÒÔ°üº¬ÆäËûÊý×é,ÕâÑù¾Í¿ÉÒÔ´´½¨Ò»¸ö¸´ÔÓµÄÊý×éÁË.
²¢ÇÒÔÚÕâµãÉÏ˵javascript×÷ΪһÖֽű¾ÓïÑÔ²»Í¬ÓÚÄÇÖÖÑϸñµÄÃæÏò¶ÔÏóµÄc++.c#,javaÁË.¾ßÓиü¸ßµÄÁé»îÐÔ.
*/
/*
ÔÚjavascript ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ