You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
44 lines
1006 B
HTML
44 lines
1006 B
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<title>Encoding Converter</title>
|
|
<meta charset="UTF-8">
|
|
|
|
<!-- CSS -->
|
|
<link rel="stylesheet" href="./enconv.css">
|
|
</head>
|
|
|
|
<body>
|
|
<!-- adding glitch effect to text -->
|
|
<div>
|
|
<h1>Encoding Converter</h1>
|
|
<p>Type a word, click 'convert' and let the magic begin!</p>
|
|
</div>
|
|
|
|
<!-- adding table with all encodings -->
|
|
<form>
|
|
<label for="input">Input:</label>
|
|
<input type="text" id="input" name="input" placeholder="Type a word...">
|
|
<button onclick="convert();">Convert</button>
|
|
</form>
|
|
|
|
<!-- adding table with all encodings -->
|
|
<table id="result">
|
|
<tr>
|
|
<th>Binary</th>
|
|
<th>Hexadecimal</th>
|
|
<th>Decimal</th>
|
|
<th>Cyrillic</th>
|
|
<th>Emoji</th>
|
|
</tr>
|
|
</table>
|
|
</body>
|
|
<script>
|
|
function convert(){
|
|
event.preventDefault();
|
|
var charles = document.getElementById("input").value;
|
|
console.log(charles,charles.charCodeAt(0).toString(2),charles.charCodeAt(0).toString(16),charles.charCodeAt(0).toString(10));
|
|
}
|
|
</script>
|
|
</html>
|