Consider the following code:
<button>Click me!</button>
- What is the correct syntax to select the button?
- document.querySelector('Click me!')
- document.querySelector('.button')
- document.querySelector('#button')
- document.querySelector('button')
Take a look at this code:
<button>Click me!</button>
<button>Click me two!</button>
<button>Click me three!</button>
<button>Click me four!</button>
- True or False: document.querySelector('button') will serve our needs to place a click handler on each button.
- To change the text of the button from "Click me!" to "Click me first!", what should we use?
- document.querySelectorAll('button')[0].innerHTML = "Click me first!"
- document.querySelector('button')[0].innerHTML = "Click me first!"
- document.querySelector('button').innerHTML = "Click me first!"
- document...