Which h3 element does the refresh() function change?
<html> <body> <button onclick="refresh()">Refresh</button> <h3>New Y-phone.</h3> <h3>New Olympic Sport?</h3> <script> function refresh() { var el = document.querySelector("h3"); el.innerHTML = "Y-phone cancelled"; } </script> </body> </html>]]>- The one inside the
div element because it's the first one - The second
h3 element - It actually changes the
div element The one inside the div element because it's the first one.