window.open()居中和显示标题


	function showStatus(url) {
		// 弹框宽高
		var width = 470;  
		var height = 170;
		// 弹框居中
		var top = (window.screen.height - 30 - height) / 2;
		var left = (window.screen.width - 30 - width) / 2;
		var openWin = window.open(url,"","width=" + width + ",height=" + height +
				",top=" + top + ",left=" + left + ",toolbar=no, status=no, menubar=no, resizable=yes, scrollbars=yes");
		setTimeout(function(){ openWin.document.title = '查看状态'; }, 100);
	};

你可能感兴趣的:(javascript,前端)