action="/action_page.php"
Tutorials, references, and examples are constantly reviewed to avoid errors, but we cannot warrant full correctness of all content. 17.1 Introduction to forms. This value can be overridden by a formaction attribute on a , , or element. Above is an example of an HTML form. Following is the syntax − Let us see an example of HTML Form action Attribute − Example. An absolute URL - points to another web site (like action="http://www.example.com/example.htm"), A relative URL - points to a file within a web site (like action="example.htm"). The purpose of the HTML action attribute is to specify the URL of a form processor (for example a PHP script which handles the form data). document.getElementById("form_id"). ..... Type of value. A form action set to a JavaScript function is not widely supported, I'm surprised it works in FireFox. This attribute overrides the form's action attribute. We use cookies to ensure that we give you the best experience on our website. Edit turned out you didn't need any extra function, just a small change here: Forms are a flexible mechanism for collecting user input because there are suitable form inputs available for entering many different types of data—text boxes, checkboxes, radio buttons, date pickers, etc. This offers a number of advantages for simple forms. Description A form is useless unless some kind of processing takes place after the form is submitted. The form attributes define the HTTP method used to send the data and the destination of the data on the server (action): action: The resource/URL where data is to be sent for processing when the form is submitted. Browser Support. This will normally be a server side script written in a scripting language like Perl or PHP. You can choose one of the following methods to add a link to the HTML button. In your html file correct form action url to the following and method should be POST: