Skip to content

Commit 9da6f96

Browse files
authored
1 parent 1a85569 commit 9da6f96

File tree

1 file changed

+103
-0
lines changed

1 file changed

+103
-0
lines changed

ares.html

+103
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8">
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
6+
<title>ARES Phonetic Alphabet Converter</title>
7+
<style>
8+
* {
9+
box-sizing: border-box;
10+
}
11+
body {
12+
font-family: Arial, sans-serif;
13+
line-height: 1.6;
14+
margin: 0;
15+
padding: 20px;
16+
background-color: #f4f4f4;
17+
}
18+
.container {
19+
max-width: 600px;
20+
margin: auto;
21+
background: #fff;
22+
padding: 20px;
23+
border-radius: 5px;
24+
box-shadow: 0 0 10px rgba(0,0,0,0.1);
25+
}
26+
h1 {
27+
text-align: center;
28+
color: #333;
29+
}
30+
textarea, input, button {
31+
font-size: 16px;
32+
}
33+
textarea {
34+
width: 100%;
35+
padding: 10px;
36+
margin-bottom: 10px;
37+
border: 1px solid #ddd;
38+
border-radius: 4px;
39+
resize: vertical;
40+
}
41+
button {
42+
display: block;
43+
width: 100%;
44+
padding: 10px;
45+
background: #5cb85c;
46+
color: #fff;
47+
border: none;
48+
border-radius: 4px;
49+
cursor: pointer;
50+
}
51+
button:hover {
52+
background: #4cae4c;
53+
}
54+
#output {
55+
margin-top: 20px;
56+
padding: 10px;
57+
background: #e9e9e9;
58+
border-radius: 4px;
59+
white-space: pre-wrap;
60+
word-wrap: break-word;
61+
}
62+
</style>
63+
</head>
64+
<body>
65+
<div class="container">
66+
<h1>ARES Phonetic Alphabet Converter</h1>
67+
<textarea id="input" rows="5" placeholder="Enter text to convert"></textarea>
68+
<button onclick="convertText()">Convert</button>
69+
<div id="output"></div>
70+
</div>
71+
72+
<script>
73+
const phoneticAlphabet = {
74+
'A': 'Alpha', 'B': 'Bravo', 'C': 'Charlie', 'D': 'Delta', 'E': 'Echo',
75+
'F': 'Foxtrot', 'G': 'Golf', 'H': 'Hotel', 'I': 'India', 'J': 'Juliett',
76+
'K': 'Kilo', 'L': 'Lima', 'M': 'Mike', 'N': 'November', 'O': 'Oscar',
77+
'P': 'Papa', 'Q': 'Quebec', 'R': 'Romeo', 'S': 'Sierra', 'T': 'Tango',
78+
'U': 'Uniform', 'V': 'Victor', 'W': 'Whiskey', 'X': 'X-ray',
79+
'Y': 'Yankee', 'Z': 'Zulu',
80+
'0': 'Zero', '1': 'One', '2': 'Two', '3': 'Three', '4': 'Four',
81+
'5': 'Five', '6': 'Six', '7': 'Seven', '8': 'Eight', '9': 'Nine'
82+
};
83+
84+
function convertText() {
85+
const input = document.getElementById('input').value.toUpperCase();
86+
const output = document.getElementById('output');
87+
let result = [];
88+
89+
for (let char of input) {
90+
if (char in phoneticAlphabet) {
91+
result.push(phoneticAlphabet[char]);
92+
} else if (char === ' ') {
93+
result.push('(SPACE)');
94+
} else {
95+
result.push(char);
96+
}
97+
}
98+
99+
output.textContent = result.join(' ');
100+
}
101+
</script>
102+
</body>
103+
</html>

0 commit comments

Comments
 (0)