-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
166 lines (154 loc) · 4.42 KB
/
Copy pathindex.html
File metadata and controls
166 lines (154 loc) · 4.42 KB
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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style>
*{
padding: 0;
margin: 0;
box-sizing: border-box;
font-family: Arial, Helvetica, sans-serif;
overflow: hidden;
}
html,body{
width: 100%;
height: 100%;
}
/* img{
object-fit: cover;
height: 90vh;
width: 24.5%;
} */
/* #task4{
height: 90vh;
width: 90vw;
object-fit: cover;
transition: all 1s;
} */
/* #task5{
height: 100vh;
width: 100%;
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
background-color: blanchedalmond;
}
#task5 button{
margin: 0.5vw 0;
padding: 1vw 2vw;
cursor: pointer;
background-color: #000;
color: #fff;
border: none;
border-radius: 50px;
} */
form{
width: 90%;
margin: 0 auto;
}
form input{
padding: 0.5vw 0.5vw;
border: none;
outline: none;
border-bottom: 1px solid #000;
}
table {
border-collapse: collapse;
width: 90%;
margin: 20px auto;
}
th, td {
border: 1px solid black;
padding: 8px;
text-align: left;
}
th {
background-color: #f2f2f2;
}
button {
background-color: #ff6666;
color: white;
border: none;
padding: 5px 10px;
cursor: pointer;
}
</style>
<title>JS Assignment</title>
</head>
<body>
<!-- Task1 -->
<!-- <button onclick="alert('Hello')">Click</button> -->
<!-- Task2 -->
<!-- <img src="phone1.avif" alt="" onclick="alert('Wanna buy?')">
<img src="phone2.avif" alt="" onclick="alert('Are you interested?')">
<img src="phone3.avif" alt="" onclick="alert('Free delivery available')">
<img src="phone4.avif" alt="" onclick="alert('This product is on sale')"> -->
<!-- Task3 -->
<table id="studentTable">
<thead>
<tr>
<th>ID</th>
<th>Name</th>
<th>Grade</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td>Spider Man</td>
<td>A</td>
<td><button onclick="deleteRow(this)">Delete</button></td>
</tr>
<tr>
<td>2</td>
<td>Super Man</td>
<td>B</td>
<td><button onclick="deleteRow(this)">Delete</button></td>
</tr>
<tr>
<td>3</td>
<td>Hulk</td>
<td>A+</td>
<td><button onclick="deleteRow(this)">Delete</button></td>
</tr>
<tr>
<td>4</td>
<td>Iron Man</td>
<td>A</td>
<td><button onclick="deleteRow(this)">Delete</button></td>
</tr>
<tr>
<td>5</td>
<td>Flash</td>
<td>D</td>
<td><button onclick="deleteRow(this)">Delete</button></td>
</tr>
<tr>
<td>6</td>
<td>Captain America</td>
<td>C</td>
<td><button onclick="deleteRow(this)">Delete</button></td>
</tr>
</tbody>
</table>
<form id="addForm">
<label for="name">Name:</label>
<input type="text" id="name" name="name" required>
<label for="grade">Grade:</label>
<input type="text" id="grade" name="grade" required>
<button type="button" onclick="addRow()">Add</button>
</form>
<!-- Task4 -->
<!-- <img src="phone1.avif" alt="" id="task4" onmouseover="src='phone4.avif'" onmouseleave="src='phone1.avif'"> -->
<!-- Task5 -->
<!-- <div id="task5">
<h1 id="head">0</h1>
<button onclick="increment()">Increment</button>
<button onclick="decrement()">Decrement</button>
</div> -->
<script src="script.js"></script>
</body>
</html>