Javascript:window.open pop-up window location problem

Source: Internet
Author: User

  This article mainly introduces the location of the Javascript:window.open pop-up window, the need for friends can refer to the following

Window.Open the location of the pop-up window. Record the   code as follows: <script language= "JavaScript" >  <!--  window.open (' Page.html ', ' newwindow ', ' height=100, width=400, Top=0, left=0, Toolbar=no, Menubar=no, Scrollbars=no, Resizable=no, Location=n o, Status=no ')//This sentence to be written in one line  -->  </SCRIPT>    parameter interpretation:    <script language= "JavaScript" > JS script starts;  window.open the command that pops up a new window;  ' page.html ' pop-up window's filename;  ' NewWindow ' Pop-up window name (not filename), not required, available empty ' Instead of;  height=100 window height;  width=400 window width;  top=0 window distance pixel value above screen;  window to the left of the screen pixel value;  toolbar=no whether the toolbar is displayed, yes to display the;  menubar,scrollbars 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;  status=no whether to display information in the status bar (usually the file is open), Yes to allow;  </SCRIPT> JS script end     echo-->  code as follows: <html>  <head>  < Script type= "Text/javascript" >  function neww () {  var W=document.getelementbyid (' W ') .value;  alert (W);  VAr H=document.getelementbyid (' h ') .value;  var Hh=document.getelementbyid ("hh") .value;  var v= document.getElementById (' V ') .value;  var style= "directories=no,location=no,menubar=no,width=" +w+ "height" +h;   var myfunc=window.open ("Http://www.baidu.com", "Nwindow", Style);  Myfunc.moveto (hh,v);   }   </script>  </head>  <body>  New Window height: <input type= "text" id= "H" size= "4" value = "/> " The width of the new window: <input type= "Text" id= "W" size= "4" value= "Y"/>  the vertical coordinates of the new window: <input type= "Text" Id= "hh" size= "4" value= "$"/>  the horizontal coordinates of the new window: <input type= "text" id= "V" size= "4" value= "a"/>  < Button onclick= "new ();" > Open Heart window </button>  </body>  </html> 

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.