-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathindex.html
41 lines (34 loc) · 963 Bytes
/
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
<html>
<head>
<script src="jsESverbsIrregular.js" charset="UTF-8"></script>
<script src="jsESverbList.js" charset="UTF-8"></script>
<script src="jsESverb.js" charset="UTF-8"></script>
<script>
var verb = new jsESverb();
function conjugate(){
var word = document.getElementById('word').value;
var result = verb.conjugate(word);
console.log(result);
var text = document.getElementById('text');
text.value = JSON.stringify(result, undefined, 4);
}
function isVerb(){
var word = document.getElementById('word').value;
var result = verb.isVerb(word);
console.log(result);
var text = document.getElementById('text');
text.value = JSON.stringify(result, undefined, 4);
}
</script>
</head>
<body>
<h1>jsESverb</h1>
Verb: <input id="word">
<br>
<br>
<button onclick="conjugate()">Conjugate (only infinitives)</button>
<button onclick="isVerb()">Is verb?</button>
<br><br><br>
<textarea id="text" rows="40" cols="100"></textarea>
</body>
</html>