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

JavaScript ¿ò¼Ü±È½Ï


JavaScript ¿ò¼Ü±È½Ï
ÏÔÖøÔöÇ¿ JavaScript ¿ª·¢µÄ¿ò¼Ü¸ÅÀÀ
Joe Lennon, Èí¼þ¿ª·¢ÈËÔ±, ×ÔÓÉÖ°ÒµÕß
¼ò½é£º ÏÖ´ú Web Õ¾µãºÍ Web Ó¦ÓóÌÐòÇãÏòÓÚÒÀÀµ´óÁ¿¿Í»§¶Ë JavaScript À´Ìṩ·á¸»µÄ½»»¥¹¦ÄÜ£¬ÓÈÆäÊÇÒì²½ HTTP ÇëÇóµÄ³öÏÖʹµÃ²»Ë¢ÐÂÒ³Ãæ¾Í¿ÉÒÔ´Ó·þÎñÆ÷¶Ë½Å±¾»òÊý¾Ý¿âϵͳ·µ»ØÊý¾Ý»òÏìÓ¦¡£ÔÚ±¾ÎÄÖУ¬Äú½«Á˽âÈçºÎͨ¹ý JavaScript ¿ò¼Ü¸üÇáËÉ¡¢¸ü¿ìËٵش´½¨¾ßÓи߶Ƚ»»¥ÐÔºÍÏìÓ¦Ð﵀ Web Õ¾µãºÍ Web Ó¦ÓóÌÐò¡£
¼ò½é
JavaScript ÊÇÃæÏò¶ÔÏóµÄ½Å±¾ÓïÑÔ£¬³¤ÆÚÒÔÀ´ÓÃ×÷ Web ä¯ÀÀÆ÷Ó¦ÓóÌÐòµÄ¿Í»§¶Ë½Å±¾½Ó¿Ú¡£JavaScript Èà Web ¿ª·¢ÈËÔ±ÄÜÒÔ±à³Ì·½Ê½´¦Àí Web Ò³ÃæÉϵĶÔÏ󣬲¢ÌṩÁËÒ»¸öÄܹ»¶¯Ì¬²Ù×÷ÕâЩ¶ÔÏóµÄƽ̨¡£ÔÚ×î³õÒýÈë JavaScript ʱ£¬Í¨³£Ö»ÓÃÓÚÌṩ Web Ò³ÃæÉϵÄһЩ²»ÖØÒªµÄÌØÐÔ£¬ÈçʱÖÓ¹¦ÄܺÍä¯ÀÀÆ÷״̬À¸ÖеĹö¶¯Îı¾µÈ¡£ÁíÒ»¸ö³£¼ûµÄÌØÐÔÊÇ “rollover link”£¬¾ÍÊǵ±Óû§½«Êó±êÒƵ½Í¼Æ¬»òÎı¾Á´½ÓÉÏʱ£¬Í¼Æ¬»òÎı¾Á´½ÓµÄÑÕÉ«»á¸Ä±ä¡£È»¶ø£¬½üÄêÀ´£¬Ëæ×Å Asynchronous JavaScript and XML (Ajax) ¸ÅÄ»ùÓÚ Web µÄ±à³ÌµÄ½»»¥ÐÔÌáÉýµ½Ò»¸öи߶ȣ¬JavaScript Ò²±äµÃÔ½À´Ô½ÖØÒª¡£ÔÚ³öÏÖ Ajax ֮ǰ£¬ËùÓзþÎñÆ÷¶Ë´¦Àí»òÊý¾Ý¿â·ÃÎʶ¼ÐèÒª “ˢД Õû¸öÒ³Ãæ»òͨ¹ýä¯ÀÀÆ÷³ÊÏÖÒ»¸öÐÂÒ³Ãæ¡£Õâ²»½ö¼õÂýÁËËٶȲ¢Ê¹Óû§¸Ðµ½¾ÚÉ¥£¬¶øÇÒ»¹ÀË·Ñ´ø¿íºÍ×ÊÔ´¡£
Ajax ±íʾ Asynchronous JavaScript and XML£¬µ«Êǽ«Æä³ÆΪ XML ÒѲ»ÔÙºÏÊÊ£¬ÒòΪ Ajax ÇëÇó¿ÉÒÔ·µ»Ø¶àÖÖ¸ñʽµÄÏìÓ¦£¬¶ø²»ÏÞÓÚ XML£¬ÀýÈç JSON (JavaScript Object Notation)¡£Ajax µÄ¹¤×÷·½Ê½ÊÇÔÊÐí JavaScript Òì²½Ìá½» HTTP ÇëÇóµ½ Web ·þÎñÆ÷£¬²¢ÇÒÔÚ²»Ë¢Ð»ò³ÊÏÖÐÂÒ³ÃæµÄÇé¿öϳÊÏÖÏìÓ¦¡£Ïà·´£¬¿ª·¢ÈËԱͨ³£Ê¹Óà DOM (Document Object Model) ²Ù×÷À´Ð޸IJ¿·Ö Web Ò³Ã棬ÏÔʾÆä±ä»¯»òÓÉ HTTP ÏìÓ¦·µ»ØµÄÊý¾Ý¡£
»ØÒ³Ê×
ʲôÊÇ JavaScript ¿ò¼Ü£¿
JavaScript ±¾Éí¾ÍÊÇÒ»ÖÖ¹¦ÄÜÇ¿´óµÄÓïÑÔ£¬Äú²»ÐèÒª¶îÍâµÄ¿ò¼Ü¾Í¿É´´½¨¸»»¥ÁªÍøÓ¦ÓóÌÐò£¨RIA£©¡£È»¶øʹÓà JavaScript ²¢²»ÊǼþÈÝÒ×µÄÊ£¬Ö÷ÒªÊÇÓÉÓÚÖ§³Ö¶à¸ö Web ä¯ÀÀÆ÷²úÉúµÄ¸´ÔÓÐÔ¡£Óë HTML ºÍ CSSÒ»Ñù£¬²»Í¬µÄä¯ÀÀÆ÷Óв»Í¬µÄ JavaScript ʵÏÖ¡£Èà JavaScript ´úÂëʵÏÖ¿çä¯ÀÀÆ÷¼æÈݼòÖ±ÊǸöجÃΡ£
JavaScript ¿ò¼Ü»ò¿âÊÇÒ»×éÄÜÇáËÉÉú³É¿çä¯ÀÀÆ÷¼æÈÝµÄ JavaScript ´úÂëµÄ¹¤¾ßºÍº¯Êý¡£Ã¿Ò»¸ö¿â¶¼ÔÚÖÚ¶àÁ÷ÐÐµÄ Web ä¯ÀÀÆ÷µÄÏÖ´ú°æ±¾ÉϽøÐÐÁË¿É¿¿µÄ²âÊÔ£¬Òò´Ë£¬Äú¿ÉÒÔ·ÅÐĵØʹÓÃÕâЩ¿ò¼Ü£¬ÄúµÄ»ùÓÚ JavaScrip


Ïà¹ØÎĵµ£º

javascript ¿Í»§¶Ë Éú³É MD5Öµ

×î½ü̫æ,ûÓÐʱ¼ä×ܽṤ×÷ÄÚÈÝÁË,æÀï͵ÏаÉ,¹²ÏíÏÂÎÒµÄJavaScript MD5 ½Å±¾
 var hex_chr = "0123456789abcdef";
function rhex(num)
{
str = "";
for(j = 0; j <= 3; j++)
str += hex_chr.charAt((num >> (j * 8 + 4)) & 0x0F) +
hex_chr.charAt((num >> (j * 8)) & 0x0F);
re ......

Javascript¿ª·¢Ö®jsѹËõƪ

YUI Compressor ѹËõ JavaScript µÄÄÚÈÝ°üÀ¨£º
ÒƳý×¢ÊÍ
ÒƳý¶îÍâµÄ¿Õ¸ñ
ϸ΢ÓÅ»¯
±êʶ·ûÌæ»»£¨Identifier Replacement£©
YUI Compressor °üÀ¨ÄÄЩϸ΢ÓÅ»¯ÄØ£¿
object["property"] £¬Èç¹ûÊôÐÔÃûÊǺϷ¨µÄ JavaScript ±êʶ·û£¨×¢£ººÏ·¨µÄ JavaScript ±êʶ·û——ÓÉÒ»¸ö×Öĸ¿ªÍ·£¬ÆäºóÑ¡ÔñÐԵؼÓÉÏÒ»¸ö»òÕ ......

javascriptÖеÄevalº¯ÊýµÄÓ÷¨(תÌù)

±¾ÎĵÄÁ½¸öÄ¿µÄ£º
£¨1£©½éÉÜjavascriptÖеÄevalº¯ÊýµÄÓ÷¨
£¨2£©ÈçºÎÔÚº¯ÊýÄÚÖ´ÐÐÈ«¾Ö´úÂë
►ÏÈÀ´ËµevalµÄÓ÷¨£¬ÄÚÈݱȽϼòµ¥£¬ÊìϤµÄ¿ÉÒÔÌø¹ý¡£
evalº¯Êý½ÓÊÕÒ»¸ö²ÎÊýs£¬Èç¹ûs²»ÊÇ×Ö·û´®£¬ÔòÖ±½Ó·µ»Øs¡£·ñÔòÖ´ÐÐsÓï¾ä¡£Èç¹ûsÓï¾äÖ´Ðнá¹ûÊÇÒ»¸öÖµ£¬Ôò·µ»Ø´ËÖµ£¬·ñÔò·µ»Øundefined¡£
ÐèÒªÌرð×¢ÒâµÄÊǶÔÏóÉùÃ÷Óï· ......

Javascript¼òÒ×¼ÆʱÆ÷£¨ÓÃÀ´¼ÇËã´úÂëµÄÖ´ÐÐʱ¼ä£©

×Ô¼ºÐ´µÄÒ»¸ö¼òÒ×¼ÆʱÆ÷£¬ÄܼÇËã´úÂëµÄÖ´ÐÐʱ¼ä£¬»¹¿ÉÒÔÄÃÀ´²âÊÔ´úÂëµÄÖ´ÐÐЧÂÊ¡£
function Counter(){
this.start();
}
Counter.prototype.getTime = function(){
var time = new Date();
return time.getSeconds()*1000+time.getMilliseconds();
}
Counter.prototype.start = function(){
this. ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ