新开window Tab居中方法

function openWin(url) {
		var iWidth = 600;
		var iHeight = 400;
		var iTop = (window.screen.availHeight - 30 - iHeight) / 2;
		var iLeft = (window.screen.availWidth - 10 - iWidth) / 2;
		window
				.open(
						url,
						"newwindow",
						"height="
								+ iHeight
								+ ", width="
								+ iWidth
								+ ", innerHeight="
								+ iHeight
								+ ", innerWidth="
								+ iWidth
								+ ", top="
								+ iTop
								+ ", left="
								+ iLeft
								+ ", toolbar =no, menubar=no, scrollbars=no, resizable=no, location=no, status=no");
	}

  

posted @ 2017-01-22 09:34  一片叶子啊  阅读(306)  评论(0编辑  收藏  举报