[英]How to open new page without refresh in full-screen mode using jquery
我想在 jquery 中打開一個頁面而不刷新和更改當前模式(全屏模式),在我的頁面中,默認情況下全屏是打開的,我想在另一個頁面中重定向用戶而不退出全屏並刷新.
我使用history.pushState()
但它對我不起作用。 這是我的一小部分代碼
<a onclick="history.pushState({},'Another page','./anotherpage?t=abc');" class="btn waves-effect waves-light orange" style="margin-top: 45px; width: 98%;">Next</a>
希望你能理解,請幫助解決我的問題。
這應該有效:
<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>
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.