-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheven-odd.html
More file actions
38 lines (35 loc) · 756 Bytes
/
even-odd.html
File metadata and controls
38 lines (35 loc) · 756 Bytes
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
<!DOCTYPE html>
<html>
<head>
<title>even odd management</title>
<style>
#nk{
background-color:grey;
}
#kk{
background-color:snow;
width: 156px;
height: 20px;
}
</style>
</head>
<body id="nk">
<h1>Even or Odd</h1>
<input type="number" id="ck">
<input type="button" id="jk" value="enter" onclick="odd_even()"><br>
<script>
function odd_even(){
var no;
no=Number(document.getElementById("ck").value);
if(no%2==0)
{
alert("Even Number");
}
else
{
alert("Odd Number");
}
}
</script>
</body>
</html>