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

javascript String.replaceº¯Êý

    javascriptµÄStringÀàÄÚÖú¯Êýreplace(regexp, newString)º¯ÊýÌṩÁË×Ö·û´®Ìæ»»¹¦ÄÜ£¬´Óº¯ÊýÔ­ÐÍÉÏ¿ÉÒÔ¿´³öÖ§³Ö Regular Exp¡£´Ëº¯Êý¹¦Äܷdz£ÊµÓ㬵«Ò²Óм¸¸öµØ·½Óеã»ìÏý£¬ÏÂÃæͨ¹ýʵ¼ÊµÄÀý×ÓÀ´ËµÃ÷£º
    ±ÈÈçÎÒÃÇÏÖÔÚÒªÕë¶Ô´®
var src="<a href=&quot;http://xx.com/a/20100601/000224.htm&quot; target=&quot;_blank&quot;>xxx</a>"
ÒªÌæ»»ÆäÖеÄHTMLË«ÒýºÅµÄתÒÆ·û &quot; Ϊʵ¼ÊµÄ " , Õý³£ÎÒÃǾͻáÖ±½Óµ÷Óà src.replace(/&quot;/g, '"');À´´ïµ½Ä¿µÄ£¬µ«ÊÇjsÈÝÒ×ÈÃÈËÃÔ»óµÄÒ»µã¾ÍÊÇ£¬ÕâÑù×ö²¢Ã»ÓÐʵ¼Ê¸Ä±äsrcµÄÖµ£¬Êµ¼Ê²âÊÔ·¢ÏÖ·µ»ØÖµ²ÅÊÇÎÒÃÇÐèÒªµÄ½á¹û£¬¶øsrc±¾ÉíÈ·²»·¢Éú±ä»¯£¬ËùÒÔʵ¼ÊÖÐÐèҪͨ¹ýÈçÏÂÀ´Íê³ÉÎÒÃǵŦÄÜ£º
     src=src.replace(/&quot;/g, '"');


Ïà¹ØÎĵµ£º

javascriptЧÂʾ­Ñé̸(Ò»)

±¾ÎÄÖ÷ÒªÊdzöÓÚÓÐÅóÓÑʹÓÃÎÒÔ­À´Ð´µÄautocompleteµÄJS¿Ø¼þ¡£µ±Êý¾ÝÁ¿´óµÄʱºò£¬»á³öÏÖЧÂʼ«ÆäÂýµÄÇé¿ö£¬ÎÒÔÚÕâ¶Îʱ¼ä×ö³öµÄһЩ²âÊÔÒ²¼°Ò»Ð©¾­Ñ飬Óë´ó¼Ò·ÖÏí£¬Èç¹ûÓдíµÄµØ·½£¬»¹ÇëÖ¸³ö¡£
¾­¹ý²âÊÔ£¬ÎÒÃǻᷢÏÖÈçϵÄÇé¿ö»òÕß˵µÄ½áÂÛ£¬Èç¹ûÄúµÄ²âÊÔ½á¹ûÓëÎҵIJ»·û£¬Çë˵Ã÷Ô­Òò£¬ÒÔ±ãÏ໥ѧϰ¡£
1£©µ±Ò»¸ö½Ï´óµÄHTML×Ö· ......

ͨ¹ýjavascript»ñµÃurl²ÎÊý

Ò³ÃæÌá½»Êý¾ÝÒ»°ãÓÐÁ½ÖÖ·½·¨£ºget,post¡£post¾ÍÊÇËùνµÄformÌá½»£¬Ê¹ÓÃÊÓͼ£»getÊÇͨ¹ýurlÌá½»¡£
Get·½·¨Ò»°ãÓúǫ́´úÂ루Èçasp,asp.net£©»ñµÃ²ÎÊý£¬´úÂëºÜ¼òµ¥£ºRequest.QueryString["id"];¼´¿É»ñÈ¡¡£ 
ÓÐЩʱºòÐèÒªÖ±½ÓÔÚǰ̨»ñÈ¡url²ÎÊý£¬ÒªÓõ½javascript£¬jsûÓÐÖ±½Ó»ñÈ¡url²ÎÊýµÄ·½·¨£¬ÄÇô£¬ÎÒÃÇÈçºÎͨ¹ýjs ......

[·­Òë]High Performance JavaScript(025)

µÚ°ËÕ  Programming Practices  ±à³Ìʵ¼ù
    Every programming language has pain points and inefficient patterns that develop over time. The appearance of these traits occurs as people migrate to the language and start pushing its boundaries. Since 2005, when the term "Ajax" ......

[·­Òë]High Performance JavaScript(032)

Fiddler
    Fiddler is an HTTP debugging proxy that examines the assets coming over the wire and helps identify any loading bottlenecks. Created by Eric Lawrence, this is a general purpose network analysis tool for Windows that provides detailed reports on any browser or web request. ......

[·­Òë]High Performance JavaScript(033)

Summary  ×ܽá
    When web pages or applications begin to feel slow, analyzing assets as they come over the wire and profiling scripts while they are running allows you to focus your optimization efforts where they are needed most.
    µ±ÍøÒ³»òÓ¦ÓóÌÐò±äÂýʱ£¬·ÖÎ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ