-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
executable file
·73 lines (67 loc) · 2.38 KB
/
index.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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
<html>
<head>
<meta charset="UTF-8">
<title>JavaScript Lesson</title>
<link rel="stylesheet" href="css/styles.css">
</head>
<body>
<hr>
<div id="container">
<h1 id="title">This is a javascript`s functions demo</h1>
<p id="article">
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Consequatur neque sequi molestiae tempore suscipit debitis animi atque id, corporis, culpa harum earum enim sapiente cumque, excepturi laborum molestias. Explicabo, nam!
</p>
<small>Want to Change this Paragaph`s background and text Color!</small><br><br>
<button id="eventButton" onclick="ChangeColor()">Click on this button</button>
<hr>
<div>
<h2>Fill in the following!(objects demo)</h2>
<br>
<small>Name</small>
<input type="text" id="personname" placeholder="Enter Name"><br><br>
<small>Age</small>
<input type="text" id="age" placeholder="Age"><br><br>
<small>Country</small>
<input type="text" id="country" placeholder="Country"><br><br>
<button id="databtn" onclick="FetchData()">Fetch Data</button><br>
<p id="output"></p>
</div>
</div>
<hr>
<div id="container2">
<h1>Closure demo</h1>
<small>Enter any number</small>
<input type="number" id="number">
<button id="square" onclick="square()">Click to see the result</button>
<p id="psquare"></p>
</div>
<hr>
<div id=container3>
<h1>Prototype,inheritance and enscapsulation demo</h1>
<small>Fill in your details here</small><br>
<small>Student name</small>
<input type="text" name="name" id="sname"><br>
<small>student Id</small>
<input type="text" name="id" id="sid">
<button id="cprototype" onclick="cprototype()"> click here to generate your score</button>
<p id="output1"></p>
</div>
<div id="container4">
<h1>custom events demo</h1>
<form>
<textarea></textarea>
</form>
<p>Whatever is typed in the above text-box is being console logged though a custom event. How awesome!</p>
</div>
<div id="container4">
<h1>Javascript Promises demo</h1>
<button id="promisebtn" onclick="promises()">click me and console.log to witness the magic of promises we see how it goes</button>
</div>
<h1>Inbuilt events Demo</h1>
<div id="container6">
<button id="hoverbtn" onmouseover="showText()" onmouseout="clearText()"> Hover the mouse over here</button>
<p id="hovermesage"></p>
</div><br><br><br><br>
<script src="js/main.js"></script>
</body>
</html>