Link e Finestre esempio 6
Otto modi di gestire i nostri Link e Finestre
In questa sezione vedremo otto esempi di come possiamo gestire i nostri link e le nostre finestre
ESEMPIO 6
Aprire una nuova finestra popup al centro dello schermo
CODE: Javascript

- <script type="text/javascript">
- <!--
- function popup(url)
- {
- var width = 610;
- var height = 310;
- var left = (screen.width - width)/2;
- var top = (screen.height - height)/2;
- var params = 'width='+width+', height='+height;
- params += ', top='+top+', left='+left;
- params += ', directories=no';
- params += ', location=no';
- params += ', menubar=no';
- params += ', resizable=no';
- params += ', scrollbars=no';
- params += ', status=no';
- params += ', toolbar=no';
- newwin=window.open(url,'windowname', params);
- if (window.focus) {newwin.focus()}
- return false;
- }
- // -->
- </script>
ESEMPIO 6
CODE: HTML
