gpt4 book ai didi

javascript - 如何全屏打开目标="_blank"?

转载 作者:行者123 更新时间:2023-11-28 03:22:51 26 4
gpt4 key购买 nike

我正在尝试以全屏方式打开新页面。下面的尺寸是我的屏幕分辨率。我仍然必须单击浏览器上的可调整大小的按钮才能将其扩展到全屏。

如何在不单击重新调整大小的情况下打开它以填充屏幕?

Helper.Redirect("resource.aspx", "_blank",
"menubar=0,scrollbars=1,width=1366,height=768,top=10")

方法

Public Shared Sub Redirect(url As String, target As String, windowFeatures As String)
Dim context As HttpContext = HttpContext.Current

If ([String].IsNullOrEmpty(target) OrElse target.Equals("_self", StringComparison.OrdinalIgnoreCase)) AndAlso [String].IsNullOrEmpty(windowFeatures) Then

context.Response.Redirect(url)
Else
Dim page As Page = DirectCast(context.Handler, Page)
If page Is Nothing Then
Throw New InvalidOperationException("Cannot redirect to new window outside Page context.")
End If
url = page.ResolveClientUrl(url)

Dim script As String
If Not [String].IsNullOrEmpty(windowFeatures) Then
script = "window.open(""{0}"", ""{1}"", ""{2}"");"
Else
script = "window.open(""{0}"", ""{1}"");"
End If

script = [String].Format(script, url, target, windowFeatures)
ScriptManager.RegisterStartupScript(page, GetType(Page), "Redirect", script, True)
End If
End Sub

我尝试了 'fullscreen=yes, scrollbars=yes,location=yes,resizable=yes' 参数。它没有用。

最佳答案

尝试:

window.open('newWin.html','NewWindow','fullscreen=yes');

来源:

Here

关于javascript - 如何全屏打开目标="_blank"?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23276927/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com