The target property represents the target window or frame in which the form results will be displayed.
This can also reflect the TARGET attribute of the HTML
Valid target attributes are: _blank, _parent, _self, and _top.
<html> <head> <title> Using the target property of the Form object</title> </head> <body> <script language="JavaScript"> <!-- function show(){ var tar = document.form1.target; if(tar == "_self"){ alert("this window"); } else{ alert("The target has not been specifically specified"); } } --> </script> <form name="form1" action="post" target="_self"> <br><br><br> <input type="button" value="submit" onClick='show()'> </form> </body> </html>