¹ØÓÚ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
Ïà¹ØÎĵµ£º
scrollHeight: »ñÈ¡¶ÔÏóµÄ¹ö¶¯¸ß¶È¡£
scrollLeft:ÉèÖûò»ñȡλÓÚ¶ÔÏó×ó±ß½çºÍ´°¿ÚÖÐÄ¿Ç°¿É¼ûÄÚÈݵÄ×î×ó¶ËÖ®¼äµÄ¾àÀë
scrollTop:ÉèÖûò»ñȡλÓÚ¶ÔÏó×¶ËºÍ´°¿ÚÖпɼûÄÚÈݵÄ×¶ËÖ®¼äµÄ¾àÀë
scrollWidth:»ñÈ¡¶ÔÏóµÄ¹ö¶¯¿í¶È
offsetHeight:»ñÈ¡¶ÔÏóÏà¶ÔÓÚ°æÃæ»òÓɸ¸×ø±ê offsetParent ÊôÐÔÖ¸¶¨µÄ¸¸×ø±êµÄ¸ß¶È
offsetL ......
Js´úÂë
<object classid="clsid:6BF52A52-394A-11D3-B153-00C04F79FAA6" id="wmp" >
<param name="URL" value="" /> ......
<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µÄ¾ÍÊÇ°ë½Ç£¬· ......