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

JavascriptÈÕÆÚ´¦ÀíÖÐÕýÔòµÄÓ¦ÓÃ


ÕýÔò±í´ïʽÊÇÒ»¸ö·Ç³£·Ç³£·Ç³£Ç¿´óµÄÓïÑÔ£¬ÕâÀïÁ¬ÐøÓÃÁËÈý¸ö·Ç³££¬ÎÒ¾õµÃ»¹²»¹»£¬Ëü½¿Ð¡µ«È´¹¦
ÄÜÇ¿´ó£¬¾ø¶ÔµÄŨËõµÄ¾ÍÊǾ«»ª£¬ÎÒ·¢ÏÖÎÒÔ½À´Ô½Ï²»¶ËüÁË¡£
Õâ¶Îʱ¼ä×öÈÕÆڵĴ¦Àí£¬ÐèÒªÓõ½ÈÕÆڵļÆË㣬°üÀ¨¼Ó¼õʲôµÄ£¬ÓÚÊÇ×öÁËÒ»¸ö¹«Óô¦ÀíµÄÀ©Õ¹£¬½Ð
String.prototype.dateExpression¡£ÒòΪÈÕÆÚ´¦Àí¶¼»áÓõ½±í´ïʽ£¬ÀýÈçÔö¼Ó10Ì죬ÎÒÒ»°ã»áÓÃ10d»òÕß+10dÒ»±íʾ£¬
ÕâÑù²»ÓÃÿ¸öº¯Êý¶¼¼ÓÉÏÌ«¶àµÄ²ÎÊý¡£ÀýÈ磺
function dateAdd(date1, date2, interval, number)
Date.prototype.dateAdd = function(expr) //expr, eg. +10d,-5y,
+20m.....
¶Ô±Èһϣ¬ÕâÁ½¸öº¯ÊýÄÄÒ»¸ö¸ü¼òÔ¼ÄØ£¿ºÁÎÞÒÉÎÊ£¬µÚ¶þ¸öº¯ÊýÔÚµ÷ÓõÄʱºòÒª¸ü¼Ó¼òµ¥£¬À´¿´·ÖÎöexprÖбí´ïʽµÄº¯Êý£¬ÏÈ¿´Õâ¸ö£º
//»ñÈ¡ÈÕÆÚµÄÆ«ÒÆÁ¿
//»ñÈ¡·ÖÎöºóµÄÈÕÆÚÆ«ÒÆÁ¿Êý¾Ý
String.prototype
.dateExpression
=
function
(
)
{
var
pattern =
"^[+-]\\
d+(ms)|[yMdhms]$"
;
//ÕâÀïÓиöС¼¼ÇÉ£¬(ms)Ó¦¸Ã·Åµ½Ç°Ã棬ÒòΪ·Åµ½ºóÃæ»áºÍm¼°s³åÍ»£¬
//»òÕßÒ²¿ÉÒÔ°Ñ[]µÄms·Öµ½²»Í¬µÄλÖã¬ÈçyMdmhs
var
reg =
new
RegExp(
pattern)
;
if
(
reg.test
(
this
)
)
{
var
interval =
this
.substr
(
this
.length
-
1
,
1
)
;
//µ¥Î»
var
symbol =
this
.substr
(
0
,
1
)
;
var
num =
parseInt(
this
.substr
(
1
,
this
.length
-
2
)
)
;
if
(
symbol ==
"-"
)
num =
-
num;
return
{
interval:
interval,
number:
num
}
}
else
{
return
null
;
}
}
Õâ¶Î´úÂë¿ÉÒÔ°ÑÒ»¸öÈÕÆÚ´¦Àí±í´ïʽÈç-10d·Ö½â³ÉÒ»¸ö½á¹¹Ìå·µ»Ø£¬·µ»ØµÄ½á¹¹´ó¸ÅÊÇÕâÑù£º
return
{
interval:
interval,
//ʱ¼ä²¿·ÖµÄËõд£¬Èçm±íʾ·ÖÖÓ£¬±íʾÄêµÈ
number:
num //·µ»ØÆ«ÒƵÄÊýÖµ
}
ÊDz»ÊǺÜÒâ˼£¬¿ÉÊÇ£¬ÓÐʲôÎÊÌâÂ𣿺ÃÏñûÓÐÎÊÌ⣬´úÂëÄÜÍêÈ«Õý³£¹¤×÷£¬»¹Ê¹ÓÃÁËÕýÔò£¬¿´ÉÏÈ¥»¹Í¦¸ß¼¶µÄ£¬·µ»Ø½á¹ûÍêÈ«Õý³££¬Ð§ÂÊÒ²²»»áµÍµ½ÄÄÀï
È¥¡£»¹ÐèÒª¸ÄÕýÂ𣿵±È»ÐèÒª£¬Ò»¸öÓÅÐãµÄ³ÌÐòÔ±Ó¦¸Ã²»Í£¸ÄÉÆ×Ô¼ºµÄ´úÂ룬ֻÓиüºÃ£¬Ã»ÓÐ×îºÃ¡£ÉÏÃæµÄ´úÂëΪʲôÎÒÃDz»Äܼò¶ÌһЩÄØ£¿wow£¬ÊÔһϣ¬»òÕß
ÓиüºÃµÄ°ì·


Ïà¹ØÎĵµ£º

javascript ѧϰ±Ê¼Ç£¨6£©

1. window ¶ÔÏóÊÇÕû¸ö BOM µÄºËÐÄ,ËùÓжÔÏóºÍ¼¯ºÏ¶¼ÒÔijÖÖ·½Ê½»Ø½Óµ½ window ¶ÔÏó.
          window ¶ÔÏó±íʾÕû¸öä¯ÀÀÆ÷´°¿Ú,µ«²»±íʾÆäÖаüº¬µÄÄÚÈÝ.
2. ¿ª·¢Õß¿ÉÒÔʹÓà window ¶ÔÏóÒƶ¯ºÍµ÷Õûä¯ÀÀÆ÷´°¿ÚµÄ±íÏÖÐÎʽ.
    window.moveBy(dx,dy); //Ïà¶Ôµ±Ç°Î»ÖÃ,ˮƽÒƶ ......

ÄÇЩÏà¼ûºÞÍíµÄ JavaScript ¼¼ÇÉ

¸ÐлÈñÉÌÆóÒµCMSµÄͶµÝ
ÐÂÎÅÀ´Ô´:Smashing Magazine
JavaScript µÄ³É¹¦ÈÃÈ˽ò½òÀÖµÀ£¬Îª Web ÍøÒ³±àд JavaScript ´úÂëÒѾ­ÊÇËùÓÐ Web Éè¼ÆʦµÄ»ù±¾¹¦£¬ÕâÃÅÓÐȤµÄÓïÑÔÔ̲Ø×ÅÐí¶à²»ÎªÈËÊìÖªµÄ¶«Î÷£¬¼´Ê¹¶àÄêµÄ JavaScript ³ÌÐòÔ±£¬Ò²Î´ÄÜÍêÈ«³Ô͸¡£±¾ÎÄ´Ó7¸ö·½Ãæ½²Êö JavaScript ÖÐÄÇЩÄã²»ºÜÊìÖªµ«·Ç³£ÊµÓõļ¼ÇÉ¡£
¼òÂ ......

JavaScript°æ Ö²Îï´óÕ½½©Ê¬


ÔÚÏßÊÔÍ棺http://asfoxes.w229.7ga.net/js
ÏÂÔصØÖ·£ºhttp://download.csdn.net/source/2235386
֮ǰ»¨ÁËÒ»¸ö½üÒ»¸öÀñ°ÝдµÄ
Ä¿Ç°»ù±¾Íê³ÉÁË£¬¿ÉÒÔÈ¥³¢ÊÔÏÂ
ä¯ÀÀÆ÷°æ±¾£º
IE8Õý³£ÔËÐÐ
op¡¢ff...ÉÐÓÐÒ»¸öСbug£¬²»ÄÜÍêÃÀÔËÐÐ
Ö÷ÒªÓÐÒÔϼ¸¸öÎÊÌâÔÝʱû´¦Àí£º
1.¸ü¼Ó¶àµÄÖ²ÎïºÍ½©Ê¬ÖÖÀàÌí¼Ó
2.Ö²ÎïºÍ½©Ê¬µÄÌùͼ»¹ ......

JavaScript ²âÊÔ¼°Ð£Ñ鹤¾ß

JavaScript ÊÇÒ»¿îÇ¿´óµÄ¹ã·ºÔËÓÃÓÚÏÖ´úWebÕ¾µã¼°Ó¦ÓõĽű¾ÓïÑÔ¡£×÷Ϊһ¸ö¼¼ÒÕ¾«Õ¿µÄ Web ¿ª·¢Õߣ¬ÕÆÎÕJavaScript¿ÉÒÔÔöÇ¿Óû§µÄʹÓÃÌåÑ飬Ìṩ½»»¥¼°¸»¿Í»§¶ËµÈ¹¦ÄÜ¡£
¾¡¹ÜJavaScript µÄÓï·¨·Ç³£¼òµ¥£¬µ«¶ÔÓÚд³ÌÐò¶øÑÔÈÔÈ»ÊÇÀ§ÄÑÖØÖØ£¬¾ÍÊÇÒòΪËüµÄÔËÐл·¾³£º»ùÓÚWebä¯ÀÀÆ÷¡£
ÒÔÏÂÄú¿ÉÒÔ¿´µ½ÊÕ¼¯µÄ8¸öʵÓÃµÄ JavaScrip ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ