티스토리 뷰

반응형

Javascript 팝업창 가운데 위치시키기

 

var _width = '1440';
var _height = '1000';
var _left = Math.ceil(( window.screen.width - _width )/2);
var _top = Math.ceil(( window.screen.width - _height )/2);

window.open("URL?UserId="+ user_id, "Popup", "width="+ _width +", height="+ _height +", left=" + _left + ", top="+ _top, "toolbar=0,location=0,directories=0,status=0,menuBar=0,scrollBars=2,resizable=0");

 

끗@#%@$!@$

반응형