Whether to display the implementation code in the address bar in the javascript pop-up window

Source: Internet
Author: User

Question:
After the page pops up in IE 7, the address bar is always displayed, which is not expected to appear in the program, but also affects the appearance. In IE6, the address bar will not appear.
Solution:
Tools --> Internet Options --> Security --> Custom Level --> allow a website to open a window without an address bar or status bar --> allow
After IE7 is set, the address bar will not appear in the pop-up window. By default, IE7 and later versions do not allow you to open a window without the address bar. This is for the sake of security.
The window. open in javascript can also be used to pop up a new page. By setting parameters, you can remove the menu bar, toolbar, scroll bar, address bar, and status bar. You can set the position of the pop-up window and change the size. The Code is as follows:
<Script type = "text/javascript" language = "JavaScript">
<! --
Window. open (test.html ', 'newwindow', 'height = 200, width = 300, top = 0, left = 0, toolbar = no, menubar = no, scrollbars = no, resizable = no, location = n o, status = no') // write a line
-->
</Script>
  
Parameter description:
<Script type = "text/javascript" language = "JavaScript"> javascript script starts;
Window. open command to pop up a new window;
The file name in the 'test.html 'pop-up window;
'Newwindow' indicates the name of the pop-up window (not the file name). It is optional and can be replaced by null;
Height = 200 window height;
Width = 300 window width;
Top = the pixel value between the 0 window and the top of the screen;
Left = 0 the pixel value between the window and the left of the screen;
Toolbar = no indicates whether to display the toolbar. yes indicates display;
Menubar and scrollbars indicate the menu bar and scroll bar.
Resizable = no: whether to change the window size. yes: yes;
Location = no indicates whether the address bar is displayed. yes indicates yes;
Status = no whether to display the information in the status bar (usually the file has been opened), yes is allowed;
</Script> end of js script
However, in some systems, ie7 still displays the status bar and address bar, and some do not. If this is not the case, you need to manually set it using the Intenet option.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.