Ask Question

Which of the following jа vascript expressions is equivalent to the given HTML code? a. Document. getelementbyId ("menu1"). menu = "class"; b. Document. getelementbyId (menu1 = "class name". menu); c. document. getElementById ("menu1")."menu"; d. document. getElementById ("menu1"). className = "menu";

+5
Answers (1)
  1. 7 May, 00:24
    0
    Option (D) is the correct answer to the following question.

    Explanation:

    In the following question there is some information is missing a line of code which is ' '.

    The following option is correct because in the following code the id name is "menu1" and the class name is "menu" and in the option D the id is "menu1" and the class name is "menu". So, that's why this option is correct.

    'document. getElementId () ' is used to take input from the user or take elements from the document.

    Option A is incorrect because there is no menu attribute inside the tag.

    Option b is incorrect because inside the parentheses "menu1" is not the class or it inside it, it is not written in that manner.

    Option C is incorrect because the name of the class is not written like this at the place of the "className"
Know the Answer?
Not Sure About the Answer?
Find an answer to your question 👍 “Which of the following jа vascript expressions is equivalent to the given HTML code? a. Document. getelementbyId ("menu1"). menu = ...” in 📗 Computers & Technology if the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers