最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - remove title bar ,menu bar ,navigation bar ,tab bar ,address bar and statusbar of browser - Stack Overflow

programmeradmin9浏览0评论

How can I remove the title bar, menu bar, navigation bar, tab bar, address bar , status bar of the browser using jquery.

The thing is that I am calling a dialog to open a poup window which should fit the monitor screen fully and should not show any bars of the browser.

How can I remove the title bar, menu bar, navigation bar, tab bar, address bar , status bar of the browser using jquery.

The thing is that I am calling a dialog to open a poup window which should fit the monitor screen fully and should not show any bars of the browser.

Share Improve this question edited Nov 1, 2012 at 8:14 Yasser Shaikh 47.8k50 gold badges208 silver badges287 bronze badges asked Nov 1, 2012 at 6:37 subbusaabusubbusaabu 1813 gold badges3 silver badges12 bronze badges 6
  • why do you need jquery for that?just go in settings and change it. – Milind Anantwar Commented Nov 1, 2012 at 6:39
  • 3 "Title bar" as in the thing that contains the close button? Like... seriously? Please no. – deceze Commented Nov 1, 2012 at 6:39
  • New browsers have a fullscreen API, you can use that. – elclanrs Commented Nov 1, 2012 at 6:39
  • It's always a bad idea to try to control the browser window. Users (and security folks) will hate you. But have a look at the fullscreen API as @elclanrs said – javascript is future Commented Nov 1, 2012 at 7:18
  • 4 People should realize that sometimes we are developing to an enterprise environment and in that case we are forced to do something that goes against the "user freedom". – Christian Commented May 20, 2016 at 18:31
 |  Show 1 more comment

3 Answers 3

Reset to default 8

The fullscreen API provides an easy way for web content to be presented using the user's entire screen. This article provides information about using this API.

The API lets you easily direct the browser to make an element and its children, if any, occupy the fullscreen, eliminating all browser user interface and other applications from the screen for the duration.

Live Example (Press Enter after site loads)

This is also a good read.

You're not going to be able to hide all of those toolbars, but you can do your best by setting the false value for whatever options here: https://developer.mozilla.org/en-US/docs/DOM/window.open ...in the third parameter for window.open, most likely these:

  • menubar
  • toolbar
  • location
  • scrollbars
  • titlebar

(not all fully compatible/supported, but it can't hurt to use them)

As for being "full screen" - the next best thing to the fullscreen API is to use these options for the third parameter of window.open:

window.open("url", "name", "top=0,left=0,width=" + window.screen.width + ",height=" + window.screen.height);

But that doesn't even guarantee it will fill the full monitor.

window.open("url","name",'height=240,width=200,top=' + top + ',left=' + left + ',directories=no,titlebar=nostatus=no,toolbar=no,menubar=no,navigationbar=no,location=no,resizable=no,scrollbars=no');

与本文相关的文章

发布评论

评论列表(0)

  1. 暂无评论