Начало
Навигация
По центру Popup
Открывает новое всплывающее окно по центру страницы в соответствии с ширины и высоты экрана пользователя.
Popup Yahoo.com
JavaScript Navigation: По центру Popup
<!-- TWO STEPS TO INSTALL CENTERED POPUP: 1. Copy the coding into the HEAD of your HTML document 2. Add the last code into the BODY of your HTML document --> <!-- STEP ONE: Paste this code into the HEAD of your HTML document --> <HEAD> <SCRIPT LANGUAGE="JavaScript"> <! > <! > <!-- Begin function NewWindow(mypage, myname, w, h, scroll) { var winl = (screen.width - w) / 2; var wint = (screen.height - h) / 2; winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable' win = window.open(mypage, myname, winprops) if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); } } // End --> </script> </HEAD> <!-- STEP TWO: Copy this code into the BODY of your HTML document --> <BODY> <!-- Put the URL inside the link's href="..." section, then carefully --> <!-- change 'name' to a name for your popup window. The last three --> <!-- items represent the popup window width, height, and scrollbars. --> <a href="http://www.yahoo.com/" onclick="NewWindow(this.href,'name','400','400','yes');return false;">Popup Yahoo.com</a> <!-- Script Size: 1.12 KB -->