-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest2.html
More file actions
36 lines (35 loc) · 1.04 KB
/
test2.html
File metadata and controls
36 lines (35 loc) · 1.04 KB
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
<html>
<head>
<script type='text/javascript' src='src/jsquest.js'></script>
<script type='text/javascript'>
var client = new XMLHttpRequest();
function mostra(data) {
alert(data);
}
function carrega() {
IniDocument('document', document.getElementById('jsontext').value, 'jsontextresult');
//IniDocument('document', document.getElementById('jsontext').value, mostra);
}
function ompliTextArea() {
document.getElementById('jsontext').value = client.responseText;
}
window.onload = function() {
client.open('GET', './Example.json', false);
client.send();
ompliTextArea();
}
</script>
<link rel='stylesheet' type='text/css' href='css/style.css' />
</head>
<body>
<div id='json' align="center">
<textarea id='jsontext' rows=20 cols=100></textarea>
<input type='button' value='Prova' onClick='carrega()'></input>
</div>
<div id='document'>
</div>
<div id='result' align="center">
<textarea id='jsontextresult' rows=2 cols=90></textarea>
</div>
</body>
</html>