Form action: javascript:alert : Action « Form « JavaScript Tutorial






<html>
    <head>
        <title>Submit Example</title>
    </head>
    <body>
        <form id="form1" method="post" action="javascript:alert('Submitted')">
            <!-- regular textbox -->
            <label for="txtName">Name:</label><br />
            <input type="text" id="txtName" name="txtName" /><br />
            
            <!-- custom submit button -->
            <input type="button" value="Submit Form" onclick="document.forms[0].submit()" />
      
        </form>
    </body>
</html>








10.17.Action
10.17.1.Get form action value
10.17.2.Form action: javascript:alert