HTML <forma> akcja Atrybut
Przykład
Po przesłaniu wyślij dane formularza do pliku o nazwie „action_page.php” (aby przetworzyć dane wejściowe):
<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>
Definicja i użycie
Atrybut określa , action
gdzie wysłać dane formularza po przesłaniu formularza.
Obsługa przeglądarki
Attribute | |||||
---|---|---|---|---|---|
action | Yes | Yes | Yes | Yes | Yes |
Składnia
<form action="URL">
Wartości atrybutów
Value | Description |
---|---|
URL | Where to send the form-data when the form is submitted. Possible values:
|
❮ Znacznik HTML <form>