-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
54 lines (50 loc) · 1.46 KB
/
index.html
File metadata and controls
54 lines (50 loc) · 1.46 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
<!DOCTYPE html>
<html lang="en">
<head>
<link rel="stylesheet" href="style.css">
<link rel="stylesheet" href="util.css">
<title>Code Decoder Using HTML , CSS and JavaScript</title>
</head>
<script>
Decode = ()=>{
var string=document.querySelector("#text-1").value;
var arr=string.split(" ");
var sum="";
for(var i=0 ; i<arr.length ; i++)
{
var a=String.fromCharCode(arr[i]);
sum+=a;
}
// console.log(sum);
document.querySelector("#text-2").value=sum;
}
// 80 114 105 116 104 97 109
// Pritham
Clear=()=>{
document.querySelector("#text-1").value="";
document.querySelector("#text-2").value="";
}
</script>
<body>
<h1 class="text-center">Welcome to Code Decoder</h1>
<div class="container bg-blue">
<h3 class="to-center-label">Type the ASCII code to convert to character</h3>
<input type="text" class="to-center-input" id="text-1" placeholder="90 95 96">
<br>
<br>
<button type="Submit" onclick="Decode()">DECODE</button>
<br>
<br>
<br>
<input type="text" class="to-center-input" id="text-2">
<br>
<br>
<button type="Submit" style="padding-left: 20px; padding-right: 20px;" onclick="Clear()">CLEAR</button>
<br>
</div>
<img src="" alt="Logo">
<footer>
<p>©Made with ⚡ by PBG</p>
</footer>
</body>
</html>