页面加载时禁用浏览器工具栏、菜单栏等

发布于 2024-08-02 07:24:09 字数 308 浏览 3 评论 0原文

我试图找出一种方法,使用 JavaScript 或 ASP.NET 在页面加载时禁用工具栏、滚动条等。

我知道我可以使用它

window.open('default.aspx', 'google', 'height=800px,width=480px,location=no,toolbar=0,directories=no,status=no,menubar=no,resizable=no,scrollbars=no');

,但我不想打开新窗口,而是想将这些设置应用到当前窗口。

问候, 明克...

I am trying to figure out a way to disable toolbars, scrollbars etc when the page loads, using JavaScript or ASP.NET.

i know i can use this

window.open('default.aspx', 'google', 'height=800px,width=480px,location=no,toolbar=0,directories=no,status=no,menubar=no,resizable=no,scrollbars=no');

but I dont want to open a new window but rather i want to apply these settings to the current window.

Regards,
MNK...

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

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

发布评论

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

评论(2

自此以后,行同陌路 2024-08-09 07:24:09

一句话:没有浏览器插件就不可能

你为什么想要这个?在学校的内部网中,学生们进行竞赛,看谁能在一小时内安装最多的工具栏?

One word: Impossible without a browser plug-in

Why do you want this anyway? For a school's intranet where students do competitions on who can install the most toolbars in one hour?

初雪 2024-08-09 07:24:09

window.open() 几乎是您唯一的选择,除非您编写全屏插件或创建嵌入浏览器的应用程序。

window.open() is pretty much your only option unless you write a full-screen plugin or create an app with a browser embedded in it.

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