Window.name

  • Revision slug: Web/API/window.name
  • Revision title: window.name
  • Revision id: 406921
  • Created:
  • Creator: Sheppy
  • Is current revision? No
  • Comment 3 words added; page display name changed to 'window.name'Moved From DOM/window.name to Web/API/window.name

Revision Content

{{ DomRef() }}

Summary

Gets/sets the name of the window.

Syntax

var string = window.name;
window.name = string;

Example

window.name = "lab_view";

Notes

The name of the window is used primarily for setting targets for hyperlinks and forms. Windows do not need to have names.

Specification

DOM Level 0. Not part of specification.

{{ languages( { "ja": "ja/DOM/window.name", "pl": "pl/DOM/window.name" } ) }}

Revision Source

<p>{{ DomRef() }}</p>
<h3 id="Summary" name="Summary">Summary</h3>
<p>Gets/sets the name of the window.</p>
<h3 id="Syntax" name="Syntax">Syntax</h3>
<pre class="eval"><em>var string</em> = window.name;
window.name = <em>string;</em>
</pre>
<h3 id="Example" name="Example">Example</h3>
<pre class="eval">window.name = "lab_view";
</pre>
<h3 id="Notes" name="Notes">Notes</h3>
<p>The name of the window is used primarily for setting targets for hyperlinks and forms. Windows do not need to have names.</p>
<h3 id="Specification" name="Specification">Specification</h3>
<p>DOM Level 0. Not part of specification.</p>

<p>{{ languages( { "ja": "ja/DOM/window.name", "pl": "pl/DOM/window.name" } ) }}</p>
Revert to this revision