Visualizzazione dei risultati da 1 a 3 su 3
  1. #1
    Utente di HTML.it
    Registrato dal
    May 2005
    Messaggi
    615

    Dimensioni finestra browser

    Buongiorno.
    Vorrei creare una pagina web di benvenuto da collocare su un CD che si autoavvia. Vorrei però che le dimensioni del browser all'atto dell'apertura della pagina si adattino alle sue dimensioni, quindi non vorrei una finestra di IE o Firefox di dimensioni normali ma più ridotte. E' possibile impostare questa proprietà nel codice della pagina web? Grazie!

    Shadow

  2. #2
    Mi ritrovo questo script guarda se fa al caso tuo

    codice:
    <html>
    <head>
    <title>Nessun titolo</title>
    <script language="JavaScript">
    <!--
    function win_open(windowWidth, windowHeight, targetWidth, targetHeight, widthMod, heightMod) 
    {
      if (windowWidth < targetWidth) 
        windowWidth += widthMod;
      if (windowHeight < targetHeight) 
        windowHeight += heightMod;
      windowLeft = (screen.availWidth / 2) - (windowWidth / 2);
      windowTop = (screen.availHeight / 2) - (windowHeight / 2);
    
      top.window.resizeTo(windowWidth,windowHeight);
      top.window.moveTo(windowLeft, windowTop);
    
      if (windowWidth < targetWidth || windowHeight < targetHeight) 
        setTimeout('win_open(' + windowWidth + ', ' + windowHeight + ', ' + targetWidth + ', ' + targetHeight + ', ' + widthMod + ', ' + heightMod + ');',10);
    }
    
    // -->
    </script>
    </head>
    <body bgcolor="#00FF66" text="black" link="blue" vlink="purple" alink="red" OnLoad="win_open(10, 10, 400, 400, 2, 2);">
    </body>
    </html>
    Ciao

  3. #3
    Utente di HTML.it
    Registrato dal
    May 2005
    Messaggi
    615
    Grazie, mi sei stato davvero utile!

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2026 vBulletin Solutions, Inc. All rights reserved.