如何打开带有隐藏地址栏的HTML文件



我需要通过调用下面写的javascript函数来打开我使用C#动态发送的.html文件

这是我用 C# 写的

 Page.ClientScript.RegisterStartupScript(this.GetType(), "", "fncpopup('" + sNewFileName + "');", true);

现在我在 JavaScript 中调用一个函数

<script type="text/javascript"> 
        //debugger;
        function fncpopup(sFileName)
        {  
            location.href = sFileName;
        }       
    </script>

我想在 Location.href 中打开我的 .html 文件,并隐藏 URL 状态栏。我该怎么做。

我想在 Location.href 中打开带有 URL 状态栏的.html文件隐藏。我该怎么做。

使用window.open

    function fncpopup(sFileName)
    {  
        window.open(sFileName, '_blank', 'toolbar=0,location=0,menubar=0');
    }    

查看文档中的更多选项

最新更新