Question 1 of 30
In a web application, a developer is tasked with dynamically updating the content of a `` element based on user interactions. The developer uses JavaScript to manipulate the Document Object Model (DOM). If the developer wants to change the text content of the `` with the ID \"info\" to \"Loading...\" when a button is clicked, which of the following methods would correctly achieve this?
`document.getElementById("info").textContent = "Loading...";`
`document.querySelector("#info").innerHTML = "Loading...";`
`document.getElementById("info").innerText = "Loading...";`
`document.getElementById("info").setAttribute("text", "Loading...");`

Preparing for Microsoft 98-383 Introduction to Programming Using HTML and CSS? Now land the interview.

73% of qualified candidates get rejected because of weak resumes. Build an ATS-optimized, recruiter-ready resume in under 5 minutes - free to start.

Build My Resume Free