프로그래밍/스크립트
javascript 팝업 가운데 띄우는 스크립트 함수
Doonee
2013. 8. 23. 13:29
반응형
<script>
function PopCenterOpen(url, name, width, height, scroll){
var x_pos = (screen.availWidth - width) / 2;
var y_pos = (screen.availHeight - height) / 2;
window.open(url, name, 'width=' + width + ', height=' + height + ', left=' + x_pos + ', top=' + y_pos + ', scrollbars=' + scroll);
}
PopCenterOpen('http://doonee.tistory.com', '두니의일상팝업', 600, 400, 'yes');
</script>