简体   繁体   中英

How to open new page without refresh in full-screen mode using jquery

I want to open a page without refreshing and changing current mode (full-screen mode) in jquery, In my page the full-screen is open by default and I would like to redirect users in another page without exiting full-screen and with refreshing.

I use history.pushState() but it doesn't work for me. Here's a small piece of my code

<a onclick="history.pushState({},'Another page','./anotherpage?t=abc');" class="btn waves-effect waves-light orange" style="margin-top: 45px; width: 98%;">Next</a>

Hope you will understand, please help to solve my problem.

This should work:

<a onclick="openFullscreen()" class="btn waves-effect waves-light orange" style="margin-top: 45px; width: 98%;">Next</a>

<script>
    function openFullscreen() {
        var win = window.open('https://example.com','full','dependent=yes, fullscreen=yes');
        win.focus();
    }
</script>

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