Javascript examples for DOM:Quiz
Use the getElementsByTagName 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.getElementsByTagName("p")[0].innerHTML = "yes"; </script>/*from w w w . j av a 2 s. com*/ </body> </html>