弹出的窗口网页居中

var temp = "channelmode=no,location=no,menubar=no,toolbar=no,directories=no,scrollbars=no,resizable=yes";
		 var width='230';
		 var height='150';
		 var left='';
		 var top='';
		 if (width) {
		  temp += ',width=' + width;
		 } else {
		  width = 0;
		 }
		 if (height) {
		  temp += ',height=' + height;
		 } else {
		  height = 0;
		 }
		 if (left) {
		  temp += ',left=' + left;
		 } else {
		  temp += ',left='
		    + Math.round((window.screen.width - parseInt(width)) / 2);
		 }
		 if (top) {
		  temp += ',top=' + top;
		 } else {
		  temp += ',top='
		    + Math.round((window.screen.height - parseInt(height)) / 2);
		 }
		var titleName='发票是否通过';
	    var win=window.open('<%=path%>/pages/dailymanage/reimbursement/checkInvoice.jsp?reimbursement.id='+id,titleName, temp);
		win.focus();

你可能感兴趣的:(jsp)