Web story/Javascript

팝업창 중앙에 띄우기

JKJ1004 2008. 7. 28. 15:23
<script type="text/javascript">
function copen(url, n, w, h, s) {
var winl = (screen.width - w) / 2;
var wint = (screen.height - h) / 2;
winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+s+',noresizable'
win = window.open(url, n, winprops)
if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}
</script>

href="javascript:copen('sf_popup.asp','copen',471,345,'0')"
반응형