Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 577f9ed

Browse files
yashksaini-coderIndie-Dev147
andauthored
Merge pull request #27 from yashksaini-coder/backup
Activity-5 completed for Day-9 Co-authored-by: Garv saini <garvkumarsaini@gmail.com>
2 parents feb98e0 + 0440b62 commit 577f9ed

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

‎Day9/Activity-5.html

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /