Sometimes we need to use the bulletin window to show some important information, the so-called bulletin window is that we browse the homepage, with the main page loading and automatically pop-up small window, the bulletin window will generally put on the news, notice information. Let's take a look at how to implement it with a few simple javascript phrases.
method One:
Insert the following JavaScript code between
<script language= "JavaScript" >
<!--
var gt = unescape ('%3e ');
var popup = null;
var over = "Launch pop-up Navigator";
Popup = window.open (', ' Popupnav ', ' Width=200,height=170,resizable=0,scrollbars=auto ');
if (popup!= null) {
if (Popup.opener = = null) {
Popup.opener = self;
}
Popup.location.href = ' test.htm ';
}
-->
</script>
Method Two:
Insert the following code directly in <body> and </body>:
<script language= "JavaScript" >
window.open ("test.htm", "Test Bulletin Window", "width=340,height=163,toolbar=0,status=0,menubar=0,resize=0");
</script>
The method is to insert a section of JavaScript code directly between Introduction to Window parameter Parameters
Toolbar=yes,no whether the toolbar is displayed
Location=yes,no whether to display the URL bar
Directories=yes,no whether to show the navigation bar
Status=yes,no whether the status bar is displayed
Menubar=yes,no whether to display menus
Scrollbars=yes,no whether scroll bars are displayed
Resizable=yes,no Whether you can change the size of the announcement window
Copyhistory=yes,no Whether the history button is displayed
width=300 the width of the announcement window
height=200 the height of the announcement window
The top left vertex of the left=100 announcement window is 100 pixels to the left of the screen
The top left vertex of the top=100 announcement window is 100 pixels above the screen
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