एचटीएमएल डोम इनपुट हिडन वस्तु
इनपुट हिडन वस्तु
इनपुट हिडन ऑब्जेक्ट एक HTML <इनपुट> तत्व का प्रतिनिधित्व करता है जिसमें टाइप = "छुपा" होता है।
एक इनपुट हिडन वस्तु तक पहुँचें
आप getElementById() का उपयोग करके टाइप = "छुपा" के साथ <इनपुट> तत्व तक पहुंच सकते हैं:
उदाहरण
var x = document.getElementById("myInput");
युक्ति: आप किसी प्रपत्र के तत्वों के संग्रह के माध्यम से खोज कर <input type="hidden"> तक भी पहुंच सकते हैं ।
एक इनपुट हिडन वस्तु बनाएँ
आप document.createElement() विधि का उपयोग करके एक <input> तत्व type="hidden" के साथ बना सकते हैं:
उदाहरण
var x = document.createElement("INPUT");
x.setAttribute("type", "hidden");
इनपुट हिडन वस्तु गुण
Property | Description |
---|---|
defaultValue | Sets or returns the default value of the hidden input field |
form | Returns a reference to the form that contains the hidden input field |
name | Sets or returns the value of the name attribute of the hidden input field |
type | Returns which type of form element a hidden input field is |
value | Sets or returns the value of the value attribute of the hidden input field |
मानक गुण और घटनाएँ
इनपुट हिडन ऑब्जेक्ट मानक गुणों और घटनाओं का भी समर्थन करता है ।
संबंधित पृष्ठ
एचटीएमएल ट्यूटोरियल: एचटीएमएल फॉर्म
HTML संदर्भ: HTML <इनपुट> टैग
HTML संदर्भ: HTML <इनपुट> प्रकार विशेषता