如何使用window.open方法

发布于 2024-12-14 13:25:52 字数 282 浏览 1 评论 0原文

我知道通过 window.open 方法,我们可以使用以下代码强制 IE 打开新的浏览器窗口,而无需任何工具栏。

window.open("","mywindow","status=1,toolbar=0");

但是,我想要的是......我有一个登录表单&我需要做的是,当用户输入他/她的登录 ID 时密码和按提交按钮,该浏览器工具栏中将打开的下一个页面(成功登录后)不应出现在那里。

任何人都可以帮助我提供生产这个东西所需的确切代码吗?

I know by window.open method we can force IE to open new browser window without any tool bar by using this following code.

window.open ("","mywindow","status=1,toolbar=0");

But, what I want is... I've a login form & what i need to do is, when ever user enter his/her login id & password & press submit button the next what ever page will open(after successfully login) in that browser's tool bar should not appear there.

Can any body help me with the exact code which needed to produce this thing.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

很酷又爱笑 2024-12-21 13:25:52

window.open 的第一个参数是 URL,因此您只需将请求的 url 作为第一个参数传递,并在用户登录后执行 window.open。
使用相同的格式隐藏工具栏,唯一的问题是没有什么可以阻止用户或网页打开另一个窗口,该窗口将再次默认具有工具栏装饰。

The first argument to window.open is the URL, so you just pass the requested url as the first parameter and execute window.open after the user is logged in.
Using the same format to hide the toolbar, the only problem is there is nothing stopping the user or a web page opening another window that would default again to having the toolbar decoration.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文