एचटीएमएल <बटन> फॉर्मेंक्टाइप विशेषता
उदाहरण
दो सबमिट बटन वाला एक फॉर्म। पहला सबमिट बटन डिफ़ॉल्ट वर्ण एन्कोडिंग के साथ प्रपत्र डेटा सबमिट करता है, और दूसरा वर्ण एन्कोडिंग के बिना प्रपत्र डेटा सबमिट करता है:
<form action="/action_page_binary.asp" method="post">
<label for="fname">First name:</label>
<input type="text" id="fname"
name="fname" value="Ståle"><br><br>
<button type="submit">Submit with character encoding</button>
<button type="submit" formenctype="text/plain">Submit without character encoding</button>
</form>
परिभाषा और उपयोग
विशेषता निर्दिष्ट करती है कि formenctype
सर्वर पर भेजने से पहले फॉर्म-डेटा को कैसे एन्कोड किया जाना चाहिए। यह विशेषता प्रपत्र की enctype
विशेषता को ओवरराइड करती है।
विशेषता का formenctype
उपयोग केवल बटन वाले बटन के लिए किया जाता है
type="submit"
।
ब्राउज़र समर्थन
तालिका में संख्याएं पहले ब्राउज़र संस्करण को निर्दिष्ट करती हैं जो विशेषता का पूर्ण समर्थन करता है।
Attribute | |||||
---|---|---|---|---|---|
formenctype | 9.0 | 10.0 | 4.0 | 5.1 | 11.5 |
वाक्य - विन्यास
<button type="submit" formenctype="value">
गुण मान
Value | Description |
---|---|
application/x-www-form-urlencoded | Default. All characters will be encoded before sent |
multipart/form-data | This value is necessary if the user will upload a file through the form |
text/plain | Sends data without any encoding at all. Not recommended |
एचटीएमएल <बटन> टैग