/
json4xml.html
25 lines (24 loc) · 1.02 KB
/
json4xml.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
<html>
<head>
<script src="http://js.static.yandex.net/jquery/1.3.2/jquery.js"></script>
<script src="json4xml.js"></script>
<script src="tests.js"></script>
<script>
$(function(){
var textarea = '<textarea style="display:block; width: 100%; height: 100px;"></textarea>',
output = $(textarea).appendTo('body'),
input = $(textarea).appendTo('body').change(function(){
var times = [(new Date()).getTime()],
test = {'in': eval('(' + this.value + ')')};
times.push((new Date()).getTime() - times[0]);
test.res = json4xml(test['in']);
times.push((new Date()).getTime() - times[0]);
output.val(test.res);
times.shift();
console.log('Times:', times);
});
});
</script>
</head>
<body></body>
</html>