in Education by
Which of the following can be used to select HTML elements based on the value of their name attributes? (a) getElementByName() (b) getElementsByName() (c) getElementsName() (d) getElementName() I got this question in a job interview. Question is from Scripting Documents topic in section Document Object Model and Event Handling in Javascript of JavaScript Select the correct answer from above options JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)

1 Answer

0 votes
by
The correct choice is (b) getElementsByName() For explanation: The getElementsByName() method returns a collection of all elements in the document with the specified name (the value of the name attribute), as a NodeList object.

Related questions

0 votes
0 votes
    The nodes that represent HTML elements are the __________ (a) Subclass nodes (b) HTML nodes (c) Window ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 23, 2021 in Education by JackTerrance
0 votes
    What is the work of the form control elements in the HTML DOM? (a) User Interface elements (b) ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 23, 2021 in Education by JackTerrance
0 votes
0 votes
    Which of these methods can be used to obtain the command name for invoking ActionEvent object? (a) ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 24, 2021 in Education by JackTerrance
0 votes
    What data structure should be used when number of elements is fixed? (a) Array (b) Array list (c ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 24, 2021 in Education by JackTerrance
0 votes
    Which of the following attributes are common to both audio and video? (a) enter (b) control (c) ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 22, 2021 in Education by JackTerrance
0 votes
    Which of the following elements are used to include audio? (a) audio (b) video (c) svg (d) aud ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 22, 2021 in Education by JackTerrance
0 votes
    Which of the following is the approach used to compress HTML in web servers and modern web browsers? (a ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 23, 2021 in Education by JackTerrance
0 votes
0 votes
0 votes
    How to get a particular value using the tagged name? (a) getElementbyID() (b) getElementsbyName() (c ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 23, 2021 in Education by JackTerrance
0 votes
    Which exception does the Iterators throw from their next() method when there are no more values to iterate, ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 23, 2021 in Education by JackTerrance
...