...<div> <div>Test 1</div> <div id="test">Test 2</div></div>...
Какой код работает только в Internet Explorer?
(Отметьте один правильный вариант ответа.)
Варианты ответа
document.all("test").parent.style.color = "red";
document.getElementById("test").parentElement.style.color = "red";(Верный ответ)
document.all("test").divs[1].style.color = "red";
document.getElementById("test").parent.style.color = "red";
document.getElementById("test").parentNode.style.color = "red";