سمة شكل <input> HTML

❮ HTML علامة <input>

مثال

حقل إدخال يقع خارج نموذج HTML (لكنه لا يزال جزءًا من النموذج):

<form action="/action_page.php" id="form1">
  <label for="fname">First name:</label>
  <input type="text" id="fname" name="fname"><br><br>
  <input type="submit" value="Submit">
</form>

<label for="lname">Last name:</label>
<input type="text" id="lname" name="lname" form="form1">

التعريف والاستخدام

تحدد السمة formالشكل الذي <input>ينتمي إليه العنصر.


دعم المتصفح

تحدد الأرقام الواردة في الجدول إصدار المتصفح الأول الذي يدعم السمة بشكل كامل.

Attribute
form Yes Yes Yes 5.1 10.6

بناء الجملة

<input form="form_id">

قيم السمات

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

❮ HTML علامة <input>