HTML <seç> formu Özellik

❮ HTML5 <select> etiketi

Örnek

Bir formun dışında (ancak yine de formun bir parçası) bulunan bir açılır liste:

<form action="/action_page.php" id="carform">
  <label for="fname">Firstname:</label>
  <input type="text" id="fname" name="fname">
  <input type="submit">
</form>

<label for="cars">Choose a car:</label>
<select name="cars" id="cars" form="carform">
  <option value="volvo">Volvo</option>
  <option value="saab">Saab</option>
  <option value="opel">Opel</option>
  <option value="audi">Audi</option>
</select>

Tanım ve Kullanım

Nitelik form, açılır listenin ait olduğu formu belirtir.

Bu özniteliğin değeri , aynı belgedeki idbir öğenin özniteliğine eşit olmalıdır. <form>


Tarayıcı Desteği

Attribute
form Yes Yes Yes Yes Yes

Sözdizimi

<select form="form_id">

Özellik Değerleri

Value Description
form_id Specifies the form element the <select> element belongs to. The value of this attribute must be equal to the id attribute of a <form> element in the same document.

❮ HTML <select> etiketi