Naming Window of index.html

J

John Cook

Is there any java script that you can use to name the window when
index.html loads? By default when index.html loads it has no name.
 
J

Joshie Surber

Is there any java script that you can use to name the window

window.name = whateverYouWant
 
G

Gérard Talbot

John Cook a écrit :
Is there any java script that you can use to name the window when
index.html loads? By default when index.html loads it has no name.

If you're opening a secondary window from it, then you do not need to
give it any name when the reserved DOM 0 keyword
opener
will suffice. Otherwise,
window.name = "SomeName";
or
self.name = "SomeName";
as long as it's without any blank space (for optimal interoperability).

Gérard
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,434
Messages
2,571,689
Members
48,796
Latest member
Greg L.

Latest Threads

Top