HTML DOM Input search type प्रॉपर्टी type="search" वाले इनपुट एलिमेंट से जुड़ी होती है। यह इनपुट सर्च एलिमेंट के लिए हमेशा "search" वापस करती है।
सिंटैक्स
Search type प्रॉपर्टी का सिंटैक्स:
searchObject.type
उदाहरण
Input search type प्रॉपर्टी का एक उदाहरण देखते हैं:
<!DOCTYPE html> <html> <body>
<h1>Search type property</h1>
<form>
FRUITS: <input type="search" id="SEARCH1" name="fruits">
</form>
<p>नीचे दिए गए बटन पर क्लिक करके ऊपर वाले एलिमेंट का प्रकार प्राप्त करें</p>
<button onclick="getType()">Get Type</button>
<p id="Sample"></p>
<script>
function getType() {
var t = document.getElementById("SEARCH1").type;
document.getElementById("Sample").innerHTML = "The type for the input field is: " + t;
}
</script>
</body> </html>
आउटपुट
यह निम्नलिखित आउटपुट उत्पन्न करेगा:

"Get Type" बटन पर क्लिक करने पर:
