今回は画面サイズの取得について説明します。画面サイズは screen.width screen.height で求めることができます。screen.widthは画面の横幅、screen.heightは画面の縦幅を返します。 以下のプログラムは画面の横幅と縦幅をアラートダイアログに表示します。 <html> <head> <title></title> <script language="JavaScript"><!-- w = screen.width; h = screen.height; alert(w+","+h); // --></script> </head> <body> </body> </html> 画面の領域を全て使うことができる場合とそうでない場合があります。特にMacintoshの場合にはメニューバーが画面上部にあるため、画面サイズに合わせてウィンドウサイズを設定した