<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Untitled Document</title><style>
#test{ background-color:red; height:100px;width:100px;position:absolute;}
</style>
</head>
<body>
</body>
<script>
window.onm
   window.onmouseup=function() //IE不支持window.onmouseup吗?为什么FF能行~~~IE没反映
   {
    alert("1");
   }</script>
</html>

解决方案 »

  1.   

    1.用 document.body.onmouseup
    2. 如果用<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
    body中加点内容,在内容上点击。
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"><html>
        <head>
            <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
            <title>Untitled Document</title>
    <style>
    #test{ background-color:red; height:100px;width:100px;position:absolute;}
    #pad{width:100%;}
    </style>
    <script>
    window.onload=function(){
       document.body.onmouseup=function()
       {
           alert("1");
       }
    }
    </script>
        </head>
        <body><div id="pad">xxxxxxxx</div>
        </body>
    </html>
      

  2.   

    能说说为什么会这样吗?????APTANA里显示IE支持window.onmouseup~~~~但是这里就是没效果~~~
      

  3.   

    MSDN关于window的参考,可看Events
    http://msdn.microsoft.com/en-us/library/ms535873(VS.85).aspx#