[英]Full Screen is exiting when i click internal Link
In my web page i am having one button (fullscreen) when i click on that button it is going for full screen and when i click reset button it is reseting. 在我的网页上,我有一个按钮(全屏),当我单击该按钮时,它将进入全屏状态;当我单击“重置”按钮时,它正在重置。 My requirement is like when i am in full screen mode if i click some other link that link should open in full screen mode.
我的要求就像当我处于全屏模式时,如果单击其他链接 ,该链接应以全屏模式打开。 my code for your view.
我的代码供您查看。 please give your suggestion regarding this
请对此提出您的建议
$(function () {
$("body").on('click', '#fullscreen', function () {
var element = document.documentElement;
if (element.requestFullscreen) {
element.requestFullscreen();
}
else if (element.mozRequestFullScreen) {
element.mozRequestFullScreen();
}
else if (element.webkitRequestFullscreen) {
element.webkitRequestFullscreen();
}
else if (element.msRequestFullscreen) {
element.msRequestFullscreen();
}
});
});
You could use window.resizeTo(screen.width,screen.height);
您可以使用
window.resizeTo(screen.width,screen.height);
which should open the new window in full screen. 它将以全屏方式打开新窗口。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.