HTML <button> formu Özelliği
Örnek
Bir formun dışında bulunan (ancak yine de formun bir parçası olan) bir düğme:
<form action="/action_page.php" method="get" id="form1">
<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">
</form>
<button type="submit" form="form1"
value="Submit">Submit</button>
Tanım ve Kullanım
Nitelik form
, düğmenin ait olduğu formu belirtir.
Bu özniteliğin değeri
, aynı belgedeki id
bir öğenin özniteliğine eşit olmalıdır.
<form>
Tarayıcı Desteği
Tablodaki sayılar, özelliği tam olarak destekleyen ilk tarayıcı sürümünü belirtir.
Attribute | |||||
---|---|---|---|---|---|
form | 10.0 | 16.0 | 4.0 | 5.1 | 9.5 |
Sözdizimi
<button form="form_id">
Özellik Değerleri
Value | Description |
---|---|
form_id | Specifies the form element the <button> element belongs to. The value of this attribute must be the id attribute of a <form> element in the same document. |
❮ HTML <button> etiketi