構文
 
  screen.width
総合 インデックス
プロパティ
FirefoxIE

説明

  • ディスプレイの表示領域全体の横幅の値を持つプロパティ。
  • 単位はピクセル。
  • 読み出し専用。

用例

ディスプレイの表示領域全体の横幅の値を取得し書き出す。
<script type="text/javascript">
<!--
document.write("スクリーンの幅(pixels):",screen.width)
//-->
</script>

この用例を実行する