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

¹ØÓÚjavascriptÄÚ´æй¶

<html>
<body>
<script type="text/JScript">
for (i=0; i<10000; i++) {    // this loop enforces the effect
    var model = new Object();
    var element = document.createElement("<br>");
    model.myElement = element;
    element.myModel = model;
    model = null;
    element = null;
}
</script>
</body>
</html>
    ÉÏÃæ½Å±¾»á·¢ÉúÄÚ´æй©£¬Ô­ÒòÊÇjavascriptÓëdomÐγÉÑ­»·ÒýÓ㬵¼ÖÂjavascript£¬dom²»ÄܽøÐÐÀ¬»øÊÕ¼¯´¦Àí¡£
    ·ÖÎöÔ­ÒòÊÇÒòΪjsºÍä¯ÀÀÆ÷µÄÀ¬»øÊÕ¼¯Ô­Àí²»Í¬£¬ÔÚjsÖд´½¨µÄ¶ÔÏ󽫻áÔÚûÓÐÖ¸Ïò¸Ã¶ÔÏóµÄÒýÓÃʱ£¬½øÐÐÄÚ´æ»ØÊÕ£¬JavaScript µÄÀ¬»øÊÕ¼¯»úÖƱ¾Éí²¢Ã»ÓÐÎÊÌ⣬µ«ä¯ÀÀÆ÷ÔÚΪ DOM ¶ÔÏó·ÖÅäºÍ»Ö¸´ÄÚ´æµÄ·½Ê½ÉÏÈ´ÓÐЩ³öÈë¡£Internet Explorer ºÍ Mozilla Firefox ¾ùʹÓÃÒýÓüÆÊýÀ´Îª DOM ¶ÔÏó´¦ÀíÄÚ´æ¡£ÔÚÒýÓüÆÊýϵͳ£¬Ã¿¸öËùÒýÓõĶÔÏ󶼻ᱣÁôÒ»¸ö¼ÆÊý£¬ÒÔ»ñϤÓжàÉÙ¶ÔÏóÕýÔÚÒýÓÃËü¡£Èç¹û¼ÆÊýΪÁ㣬¸Ã¶ÔÏó¾Í»á±»Ïú»Ù£¬ÆäÕ¼ÓõÄÄÚ´æÒ²»á·µ»Ø¸ø¶Ñ¡£ËäÈ»ÕâÖÖ½â¾ö·½°¸×ܵÄÀ´Ëµ»¹ËãÓÐЧ£¬µ«ÔÚÑ­»·ÒýÓ÷½ÃæÈ´´æÔÚһЩäµã¡£
    µ±Á½¸ö¶ÔÏó»¥ÏàÒýÓÃʱ£¬¾Í¹¹³ÉÁËÑ­»·ÒýÓã¬ÆäÖÐÿ¸ö¶ÔÏóµÄÒýÓüÆÊýÖµ¶¼±»¸³ 1¡£ÔÚ´¿À¬»øÊÕ¼¯ÏµÍ³ÖУ¬Ñ­»·ÒýÓÃÎÊÌâ²»´ó£ºÈôÉæ¼°µ½µÄÁ½¸ö¶ÔÏóÖеÄÒ»¸ö¶ÔÏó±»ÈκÎÆäËû¶ÔÏóÒýÓã¬ÄÇôÕâÁ½¸ö¶ÔÏ󶼽«±»À¬»øÊÕ¼¯¡£¶øÔÚÒýÓüÆÊýϵͳ£¬ÕâÁ½¸ö¶ÔÏ󶼲»Äܱ»Ïú»Ù£¬Ô­ÒòÊÇÒýÓüÆÊýÓÀÔ¶²»ÄÜΪÁã¡£ÔÚͬʱʹÓÃÁËÀ¬»øÊÕ¼¯ºÍÒýÓüÆÊýµÄ»ìºÏϵͳÖУ¬½«»á·¢Éúй©£¬ÒòΪϵͳ²»ÄÜÕýȷʶ±ðÑ­»·ÒýÓá£ÔÚÕâÖÖÇé¿öÏ£¬DOM ¶ÔÏóºÍ JavaScript ¶ÔÏó¾ù²»Äܱ»Ïú»Ù¡£
    Õë¶ÔÉÏÃæµÄ½Å±¾×öÒÔÏÂÐ޸ľÍÄܽâ¾öÄÚ´æй©ÎÊÌ⣺
<html>
<body>
<script type="text/JScript">
for (i=0; i<10000; i++) {    // this loop enforces the effect
var model = new Object();
var element = document.createElement("<br>");
model.myElement = element;
element.myModel = model;
model.myElement = null;
model = null;
element = null;
}
</script>
</body>
</html>
²Î¿¼£º
http://blog.csdn.ne


Ïà¹ØÎĵµ£º

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

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

JavaScript mediaplayer


Js´úÂë
<object classid="clsid:6BF52A52-394A-11D3-B153-00C04F79FAA6" id="wmp" >   
<param name="URL" value="" />                       ......

JavaScript È«½Ç°ë½Çת»»ÎÊÌâ

<script language=JAVAscript>
var s="b";
var strCode
for(var i=0;i<s.length;i++)
{
strCode=s.charCodeAt(i);
if((strCode>65248)||(strCode==12288))
{
alert("ÓÐÈ«½Ç");
break;
}
}
</script>
°ë½Ç×Ö·ûÓÉÒ»¸ö×Ö½Ú±£´æ£¬È«½Ç×Ö·ûÓÃÁ½¸ö×Ö½Ú±£´æ
ËùÒÔÂëÖµµÄ¾ø¶ÔֵСÓÚ256µÄ¾ÍÊÇ°ë½Ç£¬· ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ