एचटीएमएल डोम इनपुट ऑब्जेक्ट सबमिट करें
इनपुट सबमिट वस्तु
इनपुट सबमिट ऑब्जेक्ट एक HTML <इनपुट> तत्व का प्रतिनिधित्व करता है जिसमें टाइप = "सबमिट" होता है।
एक इनपुट सबमिट करें ऑब्जेक्ट तक पहुंचें
आप getElementById() का उपयोग करके टाइप = "सबमिट" के साथ <इनपुट> तत्व तक पहुंच सकते हैं:
उदाहरण
var x = document.getElementById("mySubmit");
युक्ति: आप किसी प्रपत्र के तत्वों के संग्रह के माध्यम से खोज कर <input type="submit"> तक भी पहुंच सकते हैं ।
एक इनपुट सबमिट ऑब्जेक्ट बनाएं
आप document.createElement() विधि का उपयोग करके टाइप = "सबमिट" के साथ एक <इनपुट> तत्व बना सकते हैं:
उदाहरण
var x = document.createElement("INPUT");
x.setAttribute("type", "submit");
इनपुट सबमिट वस्तु गुण
Property | Description |
---|---|
autofocus | Sets or returns whether a submit button should automatically get focus when the page loads |
defaultValue | Sets or returns the default value of a submit button |
disabled | Sets or returns whether the submit button is disabled, or not |
form | Returns a reference to the form that contains the submit button |
formAction | Sets or returns the value of the formaction attribute of a submit button |
formEnctype | Sets or returns the value of the formenctype attribute of a submit button |
formMethod | Sets or returns the value of the formmethod attribute of a submit button |
formNoValidate | Sets or returns whether the form-data should be validated or not, on submission |
formTarget | Sets or returns the value of the formtarget attribute of a submit button |
name | Sets or returns the value of the name attribute of a submit button |
type | Returns which type of form element the submit button is |
value | Sets or returns the value of the value attribute of the submit button |
मानक गुण और घटनाएँ
इनपुट सबमिट ऑब्जेक्ट मानक गुणों और घटनाओं का भी समर्थन करता है ।
संबंधित पृष्ठ
एचटीएमएल ट्यूटोरियल: एचटीएमएल फॉर्म
HTML संदर्भ: HTML <इनपुट> टैग
HTML संदर्भ: HTML <इनपुट> प्रकार विशेषता