HTML <form> action Atribut
Příklad
Při odeslání odešlete data formuláře do souboru s názvem „action_page.php“ (pro zpracování vstupu):
<form
action="/action_page.php"
method="get">
<label for="fname">First name:</label>
<input type="text" id="fname"
name="fname"><br><br>
<label for="lname">Last name:</label>
<input type="text" id="lname" name="lname"><br><br>
<input
type="submit" value="Submit">
</form>
Definice a použití
Atribut action
určuje, kam se mají odeslat data formuláře při odeslání formuláře.
Podpora prohlížeče
Attribute | |||||
---|---|---|---|---|---|
action | Yes | Yes | Yes | Yes | Yes |
Syntax
<form action="URL">
Hodnoty atributů
Value | Description |
---|---|
URL | Where to send the form-data when the form is submitted. Possible values:
|
❮ HTML tag <form>