JS window.open () parameter and simple example application

Source: Internet
Author: User

JS window.open () parameter and simple example application
In the window.open () method, the window controls the detailed definition of the parameter:
alwayslowered innerwidth Screeny
Alwaysraised left ScrollBars
Channelmode Location Status
Dependent menubar TitleBar
Directories outerwidth Toolbar
Fullscreen outerheight Top
Height menubar width
Hotkeys resizable Z-lock
Innerheight Screenx

Register window
function Openreg ()
{
var x,y;
x= (screen.width-640)/3;
y= (screen.height-480)/3;
window.open ("w.asp tutorial? act=reg&reggoto=", "Regwindow", "Toolbar=no,resizable=no,directories=no,status=yes, Scrollbars=auto,menubar=no,width=380,height=300,left= "+x+", top= "+y";
}

Login window
function logins ()
{
var x,y;
x= (screen.width-640)/3;
y= (screen.height-480)/3;
window.open ("W.asp?act=logins", "Regwindow", "Toolbar=no,resizable=no,directories=no,status=yes,scrollbars=auto, Menubar=no,width=300,height=280,left= "+x+", top= "+y";
}

Member Information
function MemberInfo (ID)
{
var x,y;
x= (screen.width-640)/3;
y= (screen.height-480)/3;
window.open ("W.asp?act=member&username=" +id, "Memberwindow", "toolbar=no,resizable=no,directories=no,status= Yes,scrollbars=auto,menubar=no,width=380,height=280,left= "+x+", top= "+y";
}

Publish window
Function post ()
{
var x,y;
x= (screen.width-640)/3;
y= (screen.height-480)/3;
window.open ("Post.asp?act=post", "Regwindow", "Toolbar=no,resizable=no,directories=no,status=yes,scrollbars=auto , menubar=no,width=616,height=250,left= "+x+", top= "+y");
}

Edit
function edit (ID)
{
var x,y;
x= (screen.width-640)/3;
y= (screen.height-480)/3;
window.open ("post.asp?act=edit&id=" +id, "Memberwindow", "Toolbar=no,resizable=no,directories=no,status=yes, Scrollbars=auto,menubar=no,width=616,height=250,left= "+x+", top= "+y";
}

Delete
Function del (ID)
{
var x,y;
x= (screen.width-640)/3;
y= (screen.height-480)/3;
window.open ("post.asp?act=del&id=" +id, "Regwindow", "Toolbar=no,resizable=no,directories=no,status=yes, Scrollbars=auto,menubar=no,width=616,height=250,left= "+x+", top= "+y";
}

<script language= "Web Effects" > JS script start;
window.open the command to eject a new window;
' page.html ' pop-up window file name;
' newwindow ' pop-up window The name of the mouth (not the file name), is not required, can be replaced with empty ';
height=100 window height;
width=400 window width;
top=0 window to pixel value above screen;
left=0 window from the left side of the screen The pixel value;
Toolbar=no displays the toolbar, yes is displayed,
Menubar,scrollbars represents the menu bar and scroll bar.
Resizable=no allows you to change the window size, yes to allow;
Location=no whether the address bar is displayed, yes to allow, and
Status=no whether to display information in the status bar (usually the file is open), yes to allow;
</script> JS script end

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.