Javascript examples for DOM:Quiz
Use the querySelectorAll method to find the <p> element, and change its text to "yes".
<!DOCTYPE html> <html> <body> <p>Use the DOM to change my text!</p> <script> document.querySelectorAll("p")[0].innerHTML = "yes"; </script>/*from w w w . j a v a 2 s .c om*/ </body> </html>