- <script>
- function PopupCenter(pageURL, title,w,h) {
- var left = (screen.width/2)-(w/2);
- var top = (screen.height/2)-(h/2);
- var targetWin = window.open (pageURL, title, 'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no, width='+w+', height='+h+', top='+top+', left='+left);
- }
- </script>
- <a href="javascript:void(0);" onclick="PopupCenter('', 'myPop1',400,400);">CLICK TO OPEN POPUP</a>
/blog/java-script/how-open-new-window-popup-center-screen
http://www.codebelt.com/jquery/open-new-browser-window-with-jquery-custom-size/
end
阅读(1191) | 评论(0) | 转发(0) |