简体   繁体   English

登录后需要Javascript才能全屏打开网页

[英]Need Javascript to open a web page in full screen after logging in

I have one login.aspx page one master page(Master.master). 我有一个login.aspx页一个母版页(Master.master)。 When I click on login button, my web page should view in full screen mode.This should happens automatically when user credentials are correct.Master page should open in full screen mode. 当我单击登录按钮时,我的网页应以全屏模式查看。当用户凭据正确时,这应自动发生。母版页应以全屏模式打开。

I don't want it in new window(pop up window). 我不想在新窗口(弹出窗口)中使用它。 I don't want to ask user press F11.It should work 我不想让用户按F11键,它应该可以工作

in all browsers.(mainly in firefox and Internet Explorer) 在所有浏览器中。(主要在firefox和Internet Explorer中)

I tried with below codes. 我尝试了以下代码。 But it is not working fine. 但它不能正常工作。 Please correct my code or suggest me new code. 请更正我的代码或为我建议新代码。

<script language="javascript"> 
function fullscreen() 
{ 
window.open('page.php','kyscorp','width='+screen.width+',height='+screen.height+',top=0,left=0'); 
} 
</script>

I wrote in Master.master aspx page. 我在Master.master aspx页面中写的。

Regards, 问候,

nj 新泽西州

使用window.Location代替window.open

window.location="page.php";

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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