<script>
var s;
var date = new Date;
for (var i = 0; i < 100000; i++) s = "ss";
alert(new Date - date); //79
date = new Date;
for (var i = 0; i < 100000; i++) window.s = "tt";
alert(new Date - date); //735
alert(s); //tt(注意:不是ss)
</script>
楼主是在傲游论坛的发的帖子的吧?那个斑竹回答的?
vokins 发表于 2009-6-26 10:26 http://bbs.ioage.com/cn/images/common/back.gif
欢迎光临 世界之窗论坛 (http://bbs.theworld.cn./) | Powered by Discuz! 7.2 |