JS控制窗口居中
<html>
<script language="JavaScript">
var x=640;
var y=480;
var xx=(window.screen.width-x)/2;
var yy=(window.screen.height-y)/2;
function winsize(){
window.resizeTo(x,y);
window.moveTo(xx,yy);
setTimeout("winsize()",50)}</script>
<body onload=winsize() ;onresize=winsize()>
</body>
</html>