Form.target : Form Object : Form JAVASCRIPT TUTORIALS


JAVASCRIPT TUTORIALS » Form » Form Object »

 

Form.target









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


tag.

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>







HTML code for linking to this page:

Follow Navioo On Twitter

JAVASCRIPT TUTORIALS

 Navioo Form
» Form Object