Skip to content

Commit d2cc93e

Browse files
author
abdul rafay
committed
start assigment
1 parent 8a3e8a5 commit d2cc93e

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed

index.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>Javascript DOM assigment</title>
7+
<link rel="stylesheet" href="style.css">
8+
</head>
9+
<body>
10+
11+
12+
13+
<p id="para" onclick="expent()"> this is a paragraph </p>
14+
15+
16+
17+
18+
<script src="index.js"></script>
19+
</body>
20+
</html>

index.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
function expent(){
2+
var fullText = "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
3+
document.getElementById("para").innerText = fullText;
4+
console.log(fullText);
5+
6+
}

0 commit comments

Comments
 (0)