एचटीएमएल <बटन> फॉर्म विशेषता
उदाहरण
प्रपत्र के बाहर स्थित एक बटन (लेकिन फिर भी प्रपत्र का एक भाग):
<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>
परिभाषा और उपयोग
विशेषता उस form
प्रपत्र को निर्दिष्ट करती है जिससे बटन संबंधित है।
इस विशेषता का मान समान दस्तावेज़ में किसी तत्व की id
विशेषता के बराबर होना चाहिए ।
<form>
ब्राउज़र समर्थन
तालिका में संख्याएं पहले ब्राउज़र संस्करण को निर्दिष्ट करती हैं जो विशेषता का पूर्ण समर्थन करता है।
Attribute | |||||
---|---|---|---|---|---|
form | 10.0 | 16.0 | 4.0 | 5.1 | 9.5 |
वाक्य - विन्यास
<button form="form_id">
गुण मान
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. |
एचटीएमएल <बटन> टैग