JS question...
Hi guys, I created two unordered list, one display A,B,C and other display D,E,F. I am learning JS, as you can see, I want to change 'A' to 'haha' but it doesn't work. What should I do? I think firstChild and lastChild property seems cannot use to me, but other people use it as well? <!DOCTYPE html> <html> <head> <title>Page Title</title> </head> <body> <header> <ul id='myList1'> <li>A</li> <li>B</li> <li>C</li> </ul> <ul id='myList2'> <li>D</li> <li>E</li> <li>F</li> </ul> <p id='test'></p> </header> <script> var ul1 = document.getElementById('myList1'); var first1 = ul1.firstChild; first1.innerHTML = 'haha'; </script> </body> </html>