Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the difference between form action="" and form action="."?

Tags:

html

forms

action

Is there any difference beween:

<form action="">

... and:

<form action=".">

?

like image 964
Alex Avatar asked Feb 03 '09 16:02

Alex


People also ask

What is the meaning of form action?

The HTML form action attribute defines where to send the form data when a form is submitted in an HTML document.

Why is form action used?

The HTML formaction Attribute is used to specify where to send the data of the form. After submission of the form the formaction attribute called. The form data is to be sent to the server after submission of the form.

What is form action method?

The method attribute specifies how to send form-data (the form-data is sent to the page specified in the action attribute). The form-data can be sent as URL variables (with method="get" ) or as HTTP post transaction (with method="post" ). Notes on GET: Appends form-data into the URL in name/value pairs.

What is form action element?

The action attribute defines the action to be performed when the form is submitted. Usually, the form data is sent to a file on the server when the user clicks on the submit button. In the example below, the form data is sent to a file called "action_page.php".


1 Answers

empty string normally indicates current url (e.g., http://example.com/a/test.html)
'.' - current 'directory' (e.g., http://example.com/a/)

like image 73
SilentGhost Avatar answered Oct 04 '22 05:10

SilentGhost