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

Javascript ÖеÄС֪ʶµãÕûÀí

1£¬ jsÖеÄÀàÊý×é¶ÔÏó
   (1) arguments¶ÔÏó:
 function(){
//arguments¶ÔÏóÊÇArguments¶ÔÏóʵÀý£¬ÊÇÒ»¸öÀàÊý×é¶ÔÏ󣬲¢ÓµÓÐÏÂÁз½·¨
alert(arguments instanceof Array);//false
arguments.callee(); //¶Ô×ÔÉíµÄµ÷Ó㬠ÓÃÓڵݹé
var c = arguments.caller; //¶Ôµ÷ÓÃ×ÔÉíº¯ÊýµÄ¸¸º¯Êý, Èç¹ûÊÇ×Ô¼ºÔÚwindow.A()»òÕßA(), ÄÇô¾ÍΪundefined
c = arguments.constructor //Object.prototype¼Ì³Ðº¯Êý
c = arguments.hasOwnProperty //ÅжϲÎÊýÊÇ·ñÊÇarguments¶ÔÏóµÄ±¾µØ·ÇprotorypeÊôÐÔ
c = arguments.isPrototypeOf //ÅжϲÎÊýÊÇ·ñÊÇarguments¶ÔÏóµÄprototype¼Ì³ÐµÄÊôÐÔ
c = arguments.propertyIsEnumerable() //ÓëhasOwnPropertyÀàËƺ¬ÒåµÄ·½·¨£¬±íʾÊÇ·ñÄÜö¾Ù
c = arguments.toLocaleString() //·µ»Ø¶ÔÏó±íʾ±¾µØµÄ×Ô¼ºµÄ×Ö·û´®
c = arguments.toString() //·µ»Ø¶ÔÏó±íʾ±¾µØµÄ×Ô¼ºµÄ×Ö·û´®, µ±ÐèÒª¶ÔÏó ת»¯Îª×Ö·û´®µÄʱºò£¬½âÊÍÆ÷»á×Ô¶¯µ÷Óøú¯Êý¡£Èçalert(arguments)
d = new Date();
c = d.valueOf() //·µ»Ø¶ÔÏóµÄÊýÖµÀàÐÍÖµ£¬Èç new Date() +2»á×Ô¶¯µ÷Óøú¯Êý¶øµÃµ½Ò»¸öÊýÖµÀàÐÍÖµ£¬µ«Object.prototypeÖеÄvalueOfÓëtoStringÀàÐÍ¡£arguments +3 »¹ÊÇÒ»¸ö×Ö·û´®
arguments.length //¸öÊý
c = arguments[0] //½øÐÐÀàÊý×éÈ¡Öµ²Ù×÷
}
   (2) node-list¶ÔÏ󣬼´getElementsByTagname()º¯Êý·µ»ØµÄ¶ÔÏó
2£¬ nodeName¡¢nodeValue ÒÔ¼° nodeType °üº¬ÓйØÓÚ½ÚµãµÄÐÅÏ¢¡£
nodeName ÊôÐÔº¬ÓÐij¸ö½ÚµãµÄÃû³Æ:
ÔªËؽڵãµÄ nodeName ÊDZêÇ©Ãû³Æ
ÊôÐÔ½ÚµãµÄ nodeName ÊÇÊôÐÔÃû³Æ
Îı¾½ÚµãµÄ nodeName ÓÀÔ¶ÊÇ #text
Îĵµ½ÚµãµÄ nodeName ÓÀÔ¶ÊÇ #document
×¢ÊÍ£ºnodeName Ëù°üº¬µÄ XML ÔªËصıêÇ©Ãû³ÆÓÀÔ¶ÊÇ´óдµÄ
nodeValue:
¶ÔÓÚÎı¾½Úµã£¬nodeValue ÊôÐÔ°üº¬Îı¾¡£
¶ÔÓÚÊôÐԽڵ㣬nodeValue ÊôÐÔ°üº¬ÊôÐÔÖµ¡£
nodeValue ÊôÐÔ¶ÔÓÚÎĵµ½ÚµãºÍÔªËؽڵãÊDz»¿ÉÓõġ£
nodeType:
nodeType ÊôÐÔ¿É·µ»Ø½ÚµãµÄÀàÐÍ¡£
×îÖØÒªµÄ½ÚµãÀàÐÍÊÇ£º
 
ÔªËØÀàÐͽڵãÀàÐÍ
                                  ÔªËØelement          &nbs


Ïà¹ØÎĵµ£º

JavascriptÖÐ×î³£ÓõÄ55¸ö¾­µä¼¼ÇÉ

1. oncontextm ½«³¹µ×ÆÁ±ÎÊó±êÓÒ¼ü
<table border oncontextmenu=return(false)><td>no</table> ¿ÉÓÃÓÚTable
2. <body onselectst> È¡ÏûÑ¡È¡¡¢·ÀÖ¹¸´ÖÆ
3.  ²»×¼Õ³Ìù
4.   ·ÀÖ¹¸´ÖÆ
5. <link  > IEµØÖ·À¸Ç°»»³É×Ô¼ºµÄͼ±ê
6. <link   ......

JavaScriptÖÐÊý×é·½·¨

shift£ºÉ¾³ýÔ­Êý×éµÚÒ»Ï²¢·µ»Øɾ³ýÔªËصÄÖµ£»Èç¹ûÊý×éΪ¿ÕÔò·µ»Øundefined
var a = [1,2,3,4,5];
var b = a.shift(); //a£º[2,3,4,5]  b£º1
unshift£º½«²ÎÊýÌí¼Óµ½Ô­Êý×鿪ͷ£¬²¢·µ»ØÊý×éµÄ³¤¶È
var a = [1,2,3,4,5];
var b = a.unshift(-2,-1); //a£º[-2,-1,1,2,3,4,5]  b£º7
×¢£ºÔÚIE6.0ϲ ......

Ò»¶ÎʵÏÖHTMLÒ³ÃæÄÚ¶¨ÆÚ´¥·¢Ê¼þµÄJavaScript´úÂë

Ô­´´ÓÚ2007Äê12ÔÂ16ÈÕ£¬2009Äê10ÔÂ15ÈÕǨÒÆÖÁ´Ë¡£
JavaScriptͨ¹ýÄÚÖõÄsetTimeoutº¯ÊýÀ´Íê³ÉÒ³ÃæÄڵĶ¨Ê±¼ì²é£¬Ò²ÊǺܾÃÒÔǰдµÄ¶«Î÷ÁË¡£
Ö®ËùÒÔÏëÆðËüÀ´£¬ÊÇÒòΪÔÚºÍÏîÄ¿×éÆäËû³ÉԱ˵¸ÃÊÂÇéµÄʱºò£¬±ðÈ˾¹È»³°Ð¦ÎÒ˵ÊÇÉϸöÊÀ¼ÍµÄ´úÂ룬ÏÖÔÚ¶¼ÓÃWEB2.0ÁË¡£
<script language="JavaScript" type="text ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ