-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
59 lines (56 loc) · 1.4 KB
/
index.html
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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Swift To Java Code Conversion Utility</title>
<link rel="stylesheet" href="style.css">
<script src="swiftToJava.js"></script>
</head>
<body>
<h1>Swift To Java Code Conversion Utility</h1>
<table>
<tr>
<td>
<button onclick="clearAll()">Clear All</button>
</td>
</tr>
<tr>
<td>
<label>Swift Code</label>
</td>
</tr>
<tr>
<td>
<textarea id="swiftcode" rows="4" cols="80"></textarea>
</td>
</tr>
<tr>
<td>
<button type="button" onclick="convert()">Convert to Java</button>
</td>
</tr>
<tr>
<td>
<label>Java Code</label>
</td>
</tr>
<tr>
<td>
<textarea id="javacode" rows="4" cols="80"></textarea>
</td>
</tr>
</table>
<script>
function clearAll() {
document.getElementById('swiftcode').value = "";
document.getElementById('javacode').value = "";
}
function convert() {
var swiftCode = document.getElementById('swiftcode').value;
var javaCode = convertSwiftToJava(swiftCode);
document.getElementById('javacode').innerHTML = javaCode;
}
</script>
</body>
</html>