zoukankan      html  css  js  c++  java
  • 关闭窗口是不提示代码

    方法之一:
     function NavigateToIndex()
        
    {
            window.open(
    "Index.aspx","_blank","fullscreen=yes, menubar=no, resizable=no,scrollbars=yes,status=no,titlebar=no,toolbar=no");
            window.opener 
    = "X";
            window.open('','_parent','');
            window.close();
        }

    方法二:
        
    function closeWindows()
        
    {
             document.all.WebBrowser.ExecWB(
    45,1);
             openNewWindow('Index.aspx');
        }
            <object id="WebBrowser" width="0" height="0" classid="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2">
            </object>

    完整代码:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <title>Untitled Page</title>

        <script language="javascript" type="text/javascript">
        function openNewWindow(url)
        {
            window.open(url,'window1','height=768,width=1000,status=yes,toolbar=no,menubar=no,location=no,top=0,left=0,resizable=yes','');
        }
       
        function NavigateToIndex()
        {
            window.open("Index.aspx","_blank","fullscreen=yes, menubar=no, resizable=no,scrollbars=yes,status=no,titlebar=no,toolbar=no");
            window.opener = "X";
            window.open('','_parent','');
            window.close();
        }
        function closeWindows()
        {
             document.all.WebBrowser.ExecWB(45,1);
             openNewWindow('Index.aspx');
        }
       
       
       
        </script>

    </head>
    <body onload="closeWindows();">
        <form id="form1" runat="server">
            <object id="WebBrowser" width="0" height="0" classid="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2">
            </object>
            <asp:ScriptManager ID="ScriptManager1" runat="server" />
            <table border="0" cellpadding="0" cellspacing="0" style=" 100%; height: 900px;
                background-color: Aqua;">
                <tr>
                    <td onclick="openNewWindow('Index.aspx');">
                        ddddddddddddd
                    </td>
                </tr>
            </table>
        </form>
    </body>
    </html>

  • 相关阅读:
    DRF小结
    js中BOM与DOM的概念与区别
    css单位分析、颜色设置与调色板
    css中伪类与伪元素的区别
    flexbox与grid layout的区别
    grid的简单使用
    position属性的总结
    html,css
    homework
    aboutme and my goal
  • 原文地址:https://www.cnblogs.com/wubiyu/p/839787.html
Copyright © 2011-2022 走看看