MCQs > IT & Programming > JavaScript > Which will remove a selection option from the code below?

JavaScript MCQs

Which of the following choices will remove a selection option from the code below? <button id"newbtn" onclick="g();">Remove</button> <select name="selectBox" id="selectBox"> <option value="option1">option1</option> <option value="option2">option2</option> <option value="option3">option3</option> <option value="option4">option4</option> </select>

Answer

Correct Answer: <script> function g(){ var index = 1; var d = document.getElementById("selectBox"); var d_nested = d.childNodes[index]; var throwawayNode = d.removeChild(d_nested); } </script>

Explanation:

Note: This Question is unanswered, help us to find answer for this one

JavaScript Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it

search

JavaScript Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it