-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
76 lines (71 loc) · 2.45 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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
<!DOCTYPE html>
<html>
<head>
<title>Table to json converter</title>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.11.2/lodash.min.js"></script>
<script src="https://code.jquery.com/jquery-1.12.3.min.js" integrity="sha256-aaODHAgvwQW1bFOGXMeX+pC4PZIPsvn2h1sArYOhgXQ=" crossorigin="anonymous"></script>
<script type="text/javascript" src="converter.js"></script>
<link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<div class="container">
<h1>Convert html table to json</h1>
<div class="row">
<div class="col-xs-6">
<textarea rows="20" placeholder="Please paste you html table code here" id="tableTextarea" value=""></textarea>
</div>
<div class="col-xs-6">
<textarea rows="20" placeholder="Please paste you json table here" id="jsonTextarea"></textarea>
</div>
</div>
<div class="row">
<div class="col-xs-6">
<button class="btn btn-primary center-block" onclick="convertTable()" id="convertButton">Convert table to JSON</button>
</div>
<div class="col-xs-6">
<button class="btn btn-primary center-block" onclick="convertJson()" id="convertJsonButton">Convert JSON to table</button>
</div>
</div>
<br>
<div class="row">
<button class="btn btn-success center-block" onclick="resetAll()" id="resetButton">Reset</button>
</div>
<div id="htmlTable" class="hidden"></div>
<div id="jsonTable" class="hidden"></div>
</div>
</body>
</html>
<!-- <table>
<thead>
<tr>
<td>Name</td>
<td>Age</td>
</tr>
</thead>
<tbody>
<tr>
<td>Anna</td>
<td>14</td>
</tr>
<tr>
<td>Arty</td>
<td>15</td>
</tr>
<tr>
<td>Simon</td>
<td>17</td>
</tr>
<tr>
<td>Sara</td>
<td>37</td>
</tr>
<tr>
<td>Harry</td>
<td>27</td>
</tr>
</tbody>
</table> -->
<!--
[{"Name":"Anna","Age":"14"},{"Name":"Arty","Age":"15"},{"Name":"Simon","Age":"17"},{"Name":"Sara","Age":"37"},{"Name":"Harry","Age":"27"}]
-->