HTML <बटन> प्रारूप लक्ष्य विशेषता
उदाहरण
दो सबमिट बटन वाला एक फॉर्म। पहला सबमिट बटन फॉर्म डेटा को डिफ़ॉल्ट लक्ष्य ("_self") के साथ सबमिट करता है, और दूसरा फॉर्म डेटा को एक नई विंडो (target="_blank") पर सबमिट करता है:
<form action="/action_page.php" method="get">
<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"><br><br>
<button type="submit" >Submit</button>
<button type="submit" formtarget="_blank">Submit to a new window</button>
</form>
परिभाषा और उपयोग
formtarget
विशेषता निर्दिष्ट करती है कि फ़ॉर्म सबमिट करने के बाद प्रतिक्रिया कहाँ प्रदर्शित की जाए । यह विशेषता प्रपत्र की target
विशेषता को ओवरराइड करती है।
विशेषता का formtarget
उपयोग केवल बटन वाले बटन के लिए किया जाता है
type="submit"
।
ब्राउज़र समर्थन
तालिका में संख्याएं पहले ब्राउज़र संस्करण को निर्दिष्ट करती हैं जो विशेषता का पूर्ण समर्थन करता है।
Attribute | |||||
---|---|---|---|---|---|
formtarget | 9.0 | 10.0 | 4.0 | 5.1 | 10.6 |
वाक्य - विन्यास
<button type="submit" formtarget="_blank|_self|_parent|_top|framename">
गुण मान
Value | Description |
---|---|
_blank | Loads the response in a new window/tab |
_self | Loads the response in the same frame (this is default) |
_parent | Loads the response in the parent frame |
_top | Loads the response in the full body of the window |
framename | Loads the response in a named iframe |
एचटीएमएल <बटन> टैग