本帖最后由 seraphim119 于 2009-10-21 21:38:36 编辑

解决方案 »

  1.   

    FF和ie都可以的。<script language="javascript">
    window.alert=function(){confirm(2)};
    </script>
    <input name="a" type="button" onclick="alert(1);">
      

  2.   

    confirm(2)};这是什么难不成是BUg?
      

  3.   

    父窗口中调用
    frames['iframe1'].window.alert=function(){return false;}
    后,子窗口iframe1中的alert将失败,在ie8,ff3.5下均可父窗口:a.htm<SCRIPT LANGUAGE="JavaScript">
    <!--
    function clearAlert(){

    frames['iframe1'].window.alert=function(){return false;}
    }
    //-->
    </SCRIPT>
    <iframe src="b.htm" name="iframe1" width="400" height="400" id="iframe1"></iframe>
    <input type="button" value="clearChildAlert" onclick="clearAlert()"/>子窗口 b.htm
    <input type="button" onclick="alert('bbbbbbb');"/>在未点击a.htm中的clearChildAlert按钮时,b.htm中的button可以正常弹出alert,否则点击b.htm中button将无任何反应.
      

  4.   

    我昨天试了很多次都不行啊
    1.html
    <frameset rows="73,*" style="border: 1px black;" noresize="noresize">

    <frame name="surfmainframe" src="test.html" marginheight="0" marginwidth="0" noresize="noresize">
    <frame name="surftopframe" src="test.html" scrolling=no marginheight="2" marginwidth="2" noresize="noresize" >
    </frameset>test.html
    11111111111111111111111111
    <script language="javascript">window.onbeforeunload = function() {
    return 'zzzzzzzzz';
    }
    </script>firefox就可以组织弹出,ie8就不行
      

  5.   

    我其实是在遨游中运行的脚本,因为frameset后边的代码不执行,按照我说的那个,帅哥你再试试啊
      

  6.   

    那是不是因为在ie的frame中event已经注册了,页面load完后就不能覆盖了?而没有frame的时候才能覆盖?
    而firefox则一直能覆盖?