forked from AtitBimali/web-tech-labs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Lab_No_7.html
32 lines (32 loc) · 874 Bytes
/
Lab_No_7.html
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
30
31
32
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Scripting examples</title>
</head>
<body>
<h2>Text alteration</h2>
<p id="texta">Hello my name is Atit Bimali</p>
<button
onclick="document.getElementById('texta').innerHTML='Hello this is the altered massage !'"
>
click me
</button>
<h2>Alert message</h2>
<button onclick="click_me()">click me</button>
<br />
<br />
<hr />
<script>
var a = 10;
var b = 15;
document.write("The value of a is " + a + "<br>");
document.write("The value of b is " + b + "<br><br>");
document.write("The Sum of a and b is " + (a + b));
function click_me() {
alert("This is alert message");
}
</script>
</body>
</html>