Window.name

  • Revision slug: Web/API/Window.name
  • Revision title: Window.name
  • Revision id: 489017
  • Created:
  • Creator: teoli
  • Is current revision? No
  • Comment Moved From Web/API/window.name to Web/API/Window.name

Revision Content

{{DomRef}}

Summary

Gets/sets the name of the window.

Syntax

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

{{dom0}}

Revision Source

<div>
 {{DomRef}}</div>
<h2 id="Summary" name="Summary">Summary</h2>
<p>Gets/sets the name of the window.</p>
<h2 id="Syntax" name="Syntax">Syntax</h2>
<pre class="syntaxbox">
<var>string</var> = window.name;
window.name = <var>string</var>;
</pre>
<h2 id="Example" name="Example">Example</h2>
<pre class="brush:js">
window.name = "lab_view";
</pre>
<h2 id="Notes" name="Notes">Notes</h2>
<p>The name of the window is used primarily for setting targets for hyperlinks and forms. Windows do not need to have names.</p>
<h2 id="Specification" name="Specification">Specification</h2>
<p>{{dom0}}</p>
Revert to this revision