简体   繁体   中英

how to open a html file with hidden address bar

I need to open the .html file in which i sent dynamically using C# by calling a javascript function which is written below

This i have written in C#

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

Now i call a function in Javascript

<script type="text/javascript"> 
        //debugger;

        function fncpopup(sFileName)
        {  
            location.href = sFileName;
        }       
    </script>

I want to open my .html file in Location.href with URL status bar hidden.How can i do that.

I want to open my .html file in Location.href with URL status bar hidden.How can i do that.

Use window.open

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

Check more options in the documentation

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM