Mozilla.com

  1. MDC
  2. Main Page
  3. DOM
  4. document.width

« Gecko DOM Reference

Summary

Returns the width of the body element of the current document in pixels.

Not supported by IE.

Syntax

pixels = document.width;

Example

function init() {
  alert("The width of the document is " + document.width + " pixels.");
}

Notes

See also document.height.

Specification

DOM Level 0. Not part of any standard.

Languages

Page last modified 15:02, 22 Sep 2006 by Sheppy

Files (0)