-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
41 lines (38 loc) · 1.62 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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Number Converter</title>
<link href="style.css" rel="stylesheet" type="text/css" />
</head>
<body>
<h1>Number Converter</h1>
<main>
<section>
<article id="article-1">
<p class="instructions">
<b>Convert Arabic numerals to Roman numerals:</b>
<br/>
(* Enter a number greater than 0 *)
</p>
<input type="number" id="int-to-roman-input" min="1" oninput="validity.valid||(value=''); enableButtons();" />
<button type="submit" id="int-to-roman-btn" onclick="intToRoman(); enableButtons();" for="int-to-roman-input" disabled>Submit</button>
<p id="int-to-roman-result"></p>
</article>
<article id="article-2">
<p class="instructions">
<b>Convert Roman numerals to Arabic numerals:</b>
<br/>
(* Valid letters: I, V, X, L, C, D, M *)
</p>
<input type="text" id="roman-to-int-input" pattern="[IVXLCDMivxlcdm]+" oninput="validity.valid||(value=''); enableButtons();" />
<button type="submit" id="roman-to-int-btn" onclick="romanToInt(); enableButtons();" for="roman-to-int-input" disabled>Submit</button>
<p id="roman-to-int-result"></p>
</article>
</section>
</main>
<p id="github">Check out this repository on <a href="https://github.com/Louisianish/number-converter" target="_blank" rel="noopener">GitHub</a></p>
<script src="script.js"></script>
</body>
</html>