🚀 Hurry! Offer Ends In
00 Days
00 Hours
00 Mins
00 Secs
Enroll Now
X

जावास्क्रिप्ट में एक तत्व का____________ उपयोग करके पहुँचा जा सकता है

An element can be accessed in JavaScript using :

A
getElementsByName
B
getElementsById
C
getElementsByClassName
D
All of the above
Explanation

JavaScript में किसी HTML तत्व को पहुँचने के लिए हम कई methods का उपयोग कर सकते हैं:

  • (A) getElementsByName → नाम के आधार पर एलिमेंट्स प्राप्त करता है

  • (B) getElementById → ID के आधार पर एक ही एलिमेंट प्राप्त करता है (ध्यान दें: यहाँ "Elements" नहीं बल्कि "Element" होता है)

  • (C) getElementsByClassName → किसी क्लास के सभी एलिमेंट्स प्राप्त करता है

👉 यह सभी तरीके किसी न किसी रूप में एलिमेंट्स तक पहुँचने के लिए उपयोग होते हैं।

In English:
All these methods are used in JavaScript to access elements by name, id, or class name.

Correct Answer: D) All of the above

Latest Updates