Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

Este artigo necessita de uma revisão editorial. Como posso ajudar.

Nossos voluntários ainda não traduziram este artigo para o Português (do Brasil) . Junte-se a nós e ajude a fazer o trabalho!

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.

It has also been used in some frameworks for providing cross-domain messaging (e.g., SessionVars and Dojo's dojox.io.windowName) as a more secure alternative to JSONP. Modern web applications hosting sensitive data should however not rely on window.name for cross-domain messaging but instead rather utilize the postMessage API.

Specifications

Specification Status Comment
WHATWG HTML Living Standard
The definition of 'Window.name' in that specification.
Living Standard
HTML5
The definition of 'Window.name' in that specification.
Recommendation

Etiquetas do documento e colaboradores

 Última atualização por: momdo,