diff options
author | Peter Bengtsson <mail@peterbe.com> | 2020-12-08 14:41:15 -0500 |
---|---|---|
committer | Peter Bengtsson <mail@peterbe.com> | 2020-12-08 14:41:15 -0500 |
commit | 4b1a9203c547c019fc5398082ae19a3f3d4c3efe (patch) | |
tree | d4a40e13ceeb9f85479605110a76e7a4d5f3b56b /files/de/web/api/document/width/index.html | |
parent | 33058f2b292b3a581333bdfb21b8f671898c5060 (diff) | |
download | translated-content-4b1a9203c547c019fc5398082ae19a3f3d4c3efe.tar.gz translated-content-4b1a9203c547c019fc5398082ae19a3f3d4c3efe.tar.bz2 translated-content-4b1a9203c547c019fc5398082ae19a3f3d4c3efe.zip |
initial commit
Diffstat (limited to 'files/de/web/api/document/width/index.html')
-rw-r--r-- | files/de/web/api/document/width/index.html | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/files/de/web/api/document/width/index.html b/files/de/web/api/document/width/index.html new file mode 100644 index 0000000000..5fc3e1c80a --- /dev/null +++ b/files/de/web/api/document/width/index.html @@ -0,0 +1,45 @@ +--- +title: Document.width +slug: Web/API/Document/width +translation_of: Web/API/Document/width +--- +<div>{{APIRef("DOM")}} {{Obsolete_header}}</div> + +<div class="note"> +<p><strong>Note:</strong> Starting in {{Gecko("6.0")}},<code> document.width </code>is no longer supported. Instead, use <code>document.body.clientWidth</code>. See {{domxref("element.clientWidth")}}.</p> +</div> + +<p>Gibt die Breite des {{HTMLElement("body")}} Elements des aktuellen Dokuments in Pixeln zurück.</p> + +<p>Wird nicht vom Internet Explorer unterstützt.</p> + +<h2 id="Syntax" name="Syntax">Syntax</h2> + +<pre class="syntaxbox"><em>pixels</em> = document.width; +</pre> + +<h2 id="Example" name="Example">Beispiel</h2> + +<pre class="brush:js">function init() { + alert("Die Breite des Dokuments beträgt " + document.width + " Pixel."); +} +</pre> + +<h2 id="Alternatives" name="Alternatives">Alternativen</h2> + +<pre class="syntaxbox">document.body.clientWidth /* Breite des <body> */ +document.documentElement.clientWidth /* Breite des <html> */ +window.innerWidth /* Breite des Browserfensters */ +</pre> + +<h2 id="Specification" name="Specification">Spezifikation</h2> + +<p>HTML5</p> + +<h2 id="See_also" name="See_also">Siehe auch</h2> + +<ul> + <li>{{domxref("document.height")}}</li> + <li>{{domxref("Element.clientWidth")}}</li> + <li>{{domxref("Element.scrollWidth")}}</li> +</ul> |