1
2 var x =
3 document.getElementById("myDIV");
4x.getElementsByTagName("P")[1].style.backgroundColor = "red";
1
2 var x = document.getElementById("myDIV");
3var y = x.getElementsByTagName("P");
4var i;
5for (i = 0; i < y.length; i++) {
6
7 y[i].style.backgroundColor = "red";
8}