Cycle 03
Lab Cycle 3 — JavaScript
DOM Manipulation
Problem Statement
Create a page that changes element content dynamically using JavaScript DOM manipulation.
<!DOCTYPE html>
<html>
<body>
<p id="demo">Original Text</p>
<button onclick="changeText()">Click Me</button>
<script>
function changeText() {
document.getElementById("demo").innerHTML = "Text Changed!";
document.getElementById("demo").style.color = "red";
}
</script>
</body>
</html>
Question 3 of 5