How to use window object name in JavaScript

In this article i am going to explain about name property in JavaScript.
  • 2048

Name property in JavaScript window object

The name property is used to return or set a window's name.

Syntax of name property

Browser support

The name  property is supported in all major browser.

Example of name   property

<!DOCTYPE html>



<title>Name property</title>



<h1 style="color:blue">JavaScript window Object of name Property</h1>

<script type="text/javascript">

    function newwindow() {

        win1 =' ', 'NameWindow', 'width=250,height=180')

        win1.document.write("The name of the window is : " +;



<form name="form1" action="#">

<br />

<input type="button" name="bt1" value="Open New window." onclick='newwindow()' />

<br />






You may also want to read these related articles :here

Ask Your Question 

Got a programming related question? You may want to post your question here

Programming Answers here


More Articles

© 2020 DotNetHeaven. All rights reserved.