JavaScriptÓï·¨¼¯½õ£¨ËÄ£©
m=a.getMonth(); //»ñÈ¡Ô·ÝÖµ
d=a.getDate(); //»ñÈ¡ÈÕÆÚÖµ
d1=a.getDay(); //»ñÈ¡µ±Ç°ÐÇÆÚÖµ
h=a.getHours(); //»ñÈ¡µ±Ç°Ð¡Ê±Êý
m1=a.getMinutes(); //»ñÈ¡µ±Ç°·ÖÖÓÊý
s=a.getSeconds(); //»ñÈ¡µ±Ç°ÃëÖÓÊý
¶ÔÏó.style.fontSize="ÎÄ×Ö´óС";
µ¥Î»£ºmm/cm/inÓ¢´ç/pcÅÁ/ptµã/pxÏóËØ/emÎÄ×Ö¸ß
1in=1.25cm
1pc=12pt
1pt=1.2px(800*600·Ö±çÂÊÏÂ)
Îı¾×ÖÌåÊôÐÔ£º
fontSize´óС
family×ÖÌå
colorÑÕÉ«
fontStyle·ç¸ñ£¬È¡ÖµÎªnormalÒ»°ã,italicбÌå,obliqueбÌåÇÒ¼Ó´Ö
fontWeight¼Ó´Ö,ȡֵΪ100µ½900²»µÈ,900×î´Ö,light,normal,bold
letterSpacing¼ä¾à,¸ü¸ÄÎÄ×Ö¼ä¾àÀë,ȡֵΪ,1pt,10px,1cm
textDecoration:ÎÄ×ÖÐÞÊÎ;È¡Öµ,none²»ÐÞÊÎ,underlineÏ»®Ïß,overlineÉÏ»®Ïß
background:ÎÄ×Ö±³¾°ÑÕÉ«,
backgroundImage:±³¾°Í¼Æ¬,ȡֵΪͼƬµÄ²åÈë·¾¶
1.onClick µ±¶ÔÏó±»µã»÷
2.onLoad µ±ÍøÒ³´ò¿ª,Ö»ÄÜÊéдÔÚbodyÖÐ
3.onUnload µ±ÍøÒ³¹Ø±Õ»òÀ뿪ʱ,Ö»ÄÜÊéдÔÚbodyÖÐ
4.onmouseover µ±Êó±êÐüÓÚÆäÉÏʱ
5.onmouseout µ±Êó±êÀ뿪¶ÔÏóʱ
6.onmouseup µ±Êó±êËÉ¿ª
7.onmousedown µ±Êó±ê°´Ï¼ü
8.onFocus µ±¶ÔÏó»ñÈ¡½¹µãʱ
9.onSelect µ±¶ÔÏóµÄÎı¾±»Ñ¡ÖÐʱ
10.onChange µ±¶ÔÏóµÄÄÚÈݱ»¸Ä±ä
11.onBlur µ±¶ÔÏóʧȥ½¹µã
12.onsubmit=return(ss())±íµ¥µ÷ÓÃʱ·µ»ØµÄÖµ
Ö±Ïß border-bottom:1x solid black
ÐéÏß border-bottom:1x dotted black
µã»®Ïß border-bottom:2x dashed black
Ë«Ïß border-bottom:5x double black
²Û×´ border-bottom:1x groove black
¼¹×´ border-bottom:1x ridge black
1.±ßÔµ¸ß¹âglow(color=ÑÕÉ«,strength=ÁÁ¹â´óС)<br>
2.ˮƽ·×ªfliph() ʹ¶ÔÏóˮƽ·×ª180¶È<br>
3.´¹Ö±·×ªflipv() ʹ¶ÔÏó´¹Ö±·×ª180¶È<br>
4.¶ÔÏóÄ£ºýblur(add=true/false direction=·½Ïò strength=Ç¿¶È)
addÖ¸¶¨ÊÇ·ñ°´Ó¡Ïó»ÅɽøÐÐÄ£ºýdirectionÄ£ºý·½ÏòstrengthÄ£ºýÇ¿¶È
5.¶ÔÏó͸Ã÷alpha(opaction=0-100,finishopacity=0-100,style=0/1/2/3)
opaction¶ÔÏóÕûÌ岻͸Ã÷Öµfinishopacityµ±¶ÔÏóÀûÓÃÁ˽¥Í¸Ã÷ʱ¸ÃÏîÖ¸¶¨½áÊø͸Ã÷λÖõIJ»
͸Ã÷ÖµstyleÖ¸¶¨Í¸Ã÷·½Ê½0ΪÕûÌå͸Ã÷£¬1ΪÏßÐÍ͸Ã÷£¬2ΪԲÐÍ͸Ã÷£¬3Ϊ¾ØÐÎ͸Ã÷
6.È¥³ýÑÕÉ«chroma(color=ÑÕÉ«Öµ)ʹ¶ÔÏóÖÐÑÕÉ«ÓëÖ¸¶¨ÑÕÉ«ÏàͬÇøÓò͸Ã÷
7.½¨Á¢ÒõÓ°dropshadow(color=ÒõÓ°ÑÕÉ«,offx=ˮƽÏò×óÆ«ÀëÏñ
Ïà¹ØÎĵµ£º
scrollHeight: »ñÈ¡¶ÔÏóµÄ¹ö¶¯¸ß¶È¡£
scrollLeft:ÉèÖûò»ñȡλÓÚ¶ÔÏó×ó±ß½çºÍ´°¿ÚÖÐÄ¿Ç°¿É¼ûÄÚÈݵÄ×î×ó¶ËÖ®¼äµÄ¾àÀë
scrollTop:ÉèÖûò»ñȡλÓÚ¶ÔÏó×¶ËºÍ´°¿ÚÖпɼûÄÚÈݵÄ×¶ËÖ®¼äµÄ¾àÀë
scrollWidth:»ñÈ¡¶ÔÏóµÄ¹ö¶¯¿í¶È
offsetHeight:»ñÈ¡¶ÔÏóÏà¶ÔÓÚ°æÃæ»òÓɸ¸×ø±ê offsetParent ÊôÐÔÖ¸¶¨µÄ¸¸×ø±êµÄ¸ß¶È
offsetL ......
Javascript ±¾Éí²¢²»Ö±½ÓÖ§³Ö¼Ì³Ð£¬²»¹ýjavascriptÇ¿´óÖ®´¦¾ÍÔÚÓÚÆäÎޱȵÄÁé»îÐÔ£¬Äã»ù±¾¿ÉÒÔΪËùÓûΪ¡£
1. ͨ¹ýÔÚ×ÓÀàÖе÷Óø¸ÀàµÄ¹¹½¨º¯ÊýÀ´ÊµÏּ̳С£
2. ÓÃPrototypeÀ´ÊµÏּ̳С£
3. ³£¼ûframeworkÊÇÈçºÎʵÏּ̳еġ£
4. ×ܽá ......
±¾²©¿ÍתÔØÓÚ£ºhttp://devbean.javaeye.com/blog/404040
»òÐíÄã»áÆæ¹Ö£¬ÃæÏò¶ÔÏóµÄ³ÌÐòÉè¼ÆΪʲô´ÓÊý×鿪ʼ½²Æð£¿ÕâÊÇÒòΪ……Æä¼äµÄÖÖÖÖ¹Øϵ°É……ºÙºÙ£¬ÕâÀïÏÈÂô¸ö¹Ø×Ó£¬ÏÈÀ´¿´¿´ÎÒÃÇÊìϤµÄÊý×éÔÚJavaScriptÀïÃæÊÇʲôÑù×ӵġ£
1. ´´½¨Êý×é
ÔÚJavaScriptÖÐÓкܶഴ½¨Ê ......
function function xx(){...} ¶¨Ò庯Êý
isNumeric ÅжÏÊÇ·ñÊÇÊý×Ö
innerHTML xx=¶ÔÏó.innerHTML ÊäÈëij¶ÔÏó±êÇ©ÖеÄhtmlÔ´´úÂë
innerText divid.innerText=xx ½«ÒÔdiv¶¨Î»ÒÔidÃüÃûµÄ¶ÔÏóÖµÉèΪXX
locati ......
String¶ÔÏóµÄ charAt(x)¶ÔÏó ·´»ØÖ¸¶¨¶ÔÏóµÄµÚ¶àÉÙλµÄ×Öĸ
lastIndexOf("string") ´ÓÓÒµ½×óѯÕÒÖ¸¶¨×Ö·û£¬Ã»Óзµ»Ø-1
......