JavaScript code
function Openwindow (url,name,iwidth,iheight)
{
var URL; Turn to the address of the Web page;
var name; The name of the Web page may be empty;
var iwidth; The width of the pop-up window;
var iheight; The height of the pop-up window;
var itop = (window.screen.availheight-30-iheight)/2; Gets the vertical position of the window;
var ileft = (window.screen.availwidth-10-iwidth)/2; Get the horizontal position of the window;
window.open (url,name, ' height= ' +iheight+ ',, innerheight= ' +iheight+ ', width= ' +iwidth+ ', innerwidth= ' +iWidth+ ', top= ') +itop+ ', left= ' +ileft+ ', Toolbar=no,menubar=no,scrollbars=auto,resizeable=no,location=no,status=no ');
}
Call this function when used. Such as:
<a href= "javascript:void (0);" onclick= "Javascript:openwindow (' a.html ', ', ', 400,200);" > Go to a</a>
Disadvantage: The size of the original window, regardless of location.