要完成此效果把如下代码加入到<body>区域中
<SCRIPT LANGUAGE="JavaScript">
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!
</script><center>
<form><INPUT TYPE="button" value="让你感受一下蜗牛的速度" Name="btnWhile"
onClick="WhileLoopLock()"></form>