1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
39
31
32
33
34
35
36
<!DOCTYPE html>
<html>
<head>
<title>Change Text Example</title>
</head>
<body>
<p id="demo">This is a demonstration.</p>
<button onclick="changeText()">Click Me!</button>
<script>
function changeText() {
document.getElementById("demo").innerHTML = "Text has changed!";
}
</script>
</body>
</html>