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

Javascript ѧϰ±Ê¼ÇÖ®ÒýÓÃ

ÒýÓÃÊÇÒ»¸öÖ¸Ïò¶ÔÏóʵ¼ÊλÖõÄÖ¸Õë¡£
Àý1£º
var obj = new Object();
var objRef = obj; //objÓëobjRefÖ¸Ïòͬһ¸ö¶ÔÏó,objRefÊÇÒ»¸öÒýÓÃ

×ÔÐ޸ģ¨self-modifying£©
Àý2£º
var items = new Array("one","two","three");
var itemsRef = items; //´´½¨Ò»¸öÒýÓÃ
items.push("four");
alert(items.length == itemsRef.length); //´ËʱÁ½Õß³¤¶ÈÒ»Ö£¬ÒòΪָÏòͬһ¸ö¶ÔÏó

Àý3£º
var items = new Array("one","two","three");
var itemsRef = items;
items = new Array("new"); //´ËʱitemsÓëitemsRefÖ¸Ïò²»Í¬¶ÔÏó

ÔÚÖ´ÐÐ×Ö·û´®Á¬½Ó²Ù×÷ʱ£¬×ÜÊÇ»á²úÉúÒ»¸öеÄ×Ö·û´®¶ÔÏ󣬶ø²»ÊÇÔÚÔ­×Ö·û´®ÉϽøÐиü¸Ä¡£
Àý4£º
var item = "test";
var itemRef = item;
item += "ing";
alert(item != itemRef); //´ËʱitemÓëitemRefÖ¸Ïò²»Í¬¶ÔÏó


Ïà¹ØÎĵµ£º

JavaScript »ñÈ¡¶ÔÏóµÄ¸ß¶ÈºÍ¿í¶ÈÏêϸ˵Ã÷

scrollHeight: »ñÈ¡¶ÔÏóµÄ¹ö¶¯¸ß¶È¡£
scrollLeft:ÉèÖûò»ñȡλÓÚ¶ÔÏó×ó±ß½çºÍ´°¿ÚÖÐÄ¿Ç°¿É¼ûÄÚÈݵÄ×î×ó¶ËÖ®¼äµÄ¾àÀë
scrollTop:ÉèÖûò»ñȡλÓÚ¶ÔÏó×¶ËºÍ´°¿ÚÖпɼûÄÚÈݵÄ×¶ËÖ®¼äµÄ¾àÀë
scrollWidth:»ñÈ¡¶ÔÏóµÄ¹ö¶¯¿í¶È
offsetHeight:»ñÈ¡¶ÔÏóÏà¶ÔÓÚ°æÃæ»òÓɸ¸×ø±ê offsetParent ÊôÐÔÖ¸¶¨µÄ¸¸×ø±êµÄ¸ß¶È
offsetL ......

Îò͸JavaScript Ô­Öø£ºÀîÕ½(leadzen)

Ô­Öø£ºÀîÕ½(leadzen).ÉîÛÚ 2008-2-23
Òý×Ó
    ±à³ÌÊÀ½çÀïÖ»´æÔÚÁ½ÖÖ»ù±¾ÔªËØ£¬Ò»¸öÊÇÊý¾Ý£¬Ò»¸öÊÇ´úÂë¡£±à³ÌÊÀ½ç¾ÍÊÇÔÚÊý¾ÝºÍ´úÂëǧ˿ÍòÂƵľÀ²øÖгÊÏÖ³öÎÞÏÞµÄÉú»úºÍ»îÁ¦¡£
    Êý¾ÝÌìÉú¾ÍÊÇÎľ²µÄ£¬×ÜÏë±£³Ö×Ô¼º¹ÌÓеı¾É«£»¶ø´úÂëÈ´ÌìÉú»îÆã¬×ÜÏë¸Ä±äÕâ¸öÊÀ½ç¡£
  
Äã¿ ......

Ò»ÌõJavaScriptÓï¾ä»ñÈ¡µ±Ç°ÍøÒ³ËùÓÐͼƬµÄurl


ÔÚµØÖ·À¸ÊäÈ룺
javascript:str='';for%20(var1=0;var1<document.images.length;var1++){str+='\n'+document.images[var1].src};if(str!=''){document.write(str);void(document.close())}else{alert('No%20images!')}
È»ºó²é¿´Ð³öÀ´µÄÒ³ÃæµÄÔ´´úÂë
ÈôÒªÏÔʾ³öÀ´£¬Ôò£º
javascript:funcname='';for%20(var1=0;var ......

ÓÃJavaScriptÐÞ¸ÄÍøÒ³cssÑùʽ

ÓÃJavaScriptÐÞ¸ÄÍøÒ³Ñùʽ
Ò»¡¢¾Ö²¿¸Ä±äÑùʽ
·ÖΪ¸Ä±äÖ±½ÓÑùʽ£¬¸Ä±äclassNameºÍ¸Ä±äcssTextÈýÖÖ¡£ÐèҪעÒâµÄÊÇ£º
×¢Òâ´óСд
£º
javascript¶Ô´óСдʮ·ÖÃô¸Ð£¬className²»Äܹ»°Ñ“N”д³É“n”£¬cssTextÒ²²»Äܹ»°Ñ“T”д³É“t”£¬·ñÔòÎÞ·¨ÊµÏÖЧ¹û¡£
µ÷Ó÷½·¨
£º
Èç¹û¸Ä ......

javascriptµÄÈÕÆÚÀý×Ó

<script language="JavaScript">
<!--
calendar = new Date();
day = calendar.getDay();
month = calendar.getMonth();
date = calendar.getDate();
year = calendar.getYear();
if (year< 100) year = 1900 + year;
cent = parseInt(year/100);
g = year % 19;
k = parseInt((cent - 17)/25);
i = ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ