|
|
@ -5,7 +5,7 @@
|
|
|
|
<meta charset="UTF-8">
|
|
|
|
<meta charset="UTF-8">
|
|
|
|
|
|
|
|
|
|
|
|
<!-- CSS -->
|
|
|
|
<!-- CSS -->
|
|
|
|
<link rel="stylesheet" href="/public_html/si21-2/enconv/enconv.css">
|
|
|
|
<link rel="stylesheet" href="./enconv.css">
|
|
|
|
</head>
|
|
|
|
</head>
|
|
|
|
|
|
|
|
|
|
|
|
<body>
|
|
|
|
<body>
|
|
|
@ -19,7 +19,7 @@
|
|
|
|
<form>
|
|
|
|
<form>
|
|
|
|
<label for="input">Input:</label>
|
|
|
|
<label for="input">Input:</label>
|
|
|
|
<input type="text" id="input" name="input" placeholder="Type a word...">
|
|
|
|
<input type="text" id="input" name="input" placeholder="Type a word...">
|
|
|
|
<button>Convert</button>
|
|
|
|
<button onclick="convert();">Convert</button>
|
|
|
|
</form>
|
|
|
|
</form>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- adding table with all encodings -->
|
|
|
|
<!-- adding table with all encodings -->
|
|
|
@ -33,4 +33,11 @@
|
|
|
|
</tr>
|
|
|
|
</tr>
|
|
|
|
</table>
|
|
|
|
</table>
|
|
|
|
</body>
|
|
|
|
</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>
|
|
|
|
</html>
|
|
|
|