We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents feb98e0 + 0440b62 commit 577f9edCopy full SHA for 577f9ed
Day9/Activity-5.html
@@ -0,0 +1,20 @@
1
+<!DOCTYPE html>
2
+<html lang="en">
3
+<head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>Activity-5</title>
7
+</head>
8
+<body>
9
+ <!-- Add a click event listener to a button that changes the text content of a paragraph. -->
10
+ <p>This is a pragraph who's content is about to be changed once the function is called on the button click.</p>
11
+ <br>
12
+ <button onclick="changeText()">Change Text</button>
13
+ <script>
14
+ function changeText(){
15
+ var p = document.querySelector('p');
16
+ p.textContent = "This is a new paragraph content.";
17
+ }
18
+ </script>
19
+</body>
20
+</html>
0 commit comments