jqGrid Table to jqGrid

jqGrid v4.6

by 1004lucifer

HTML

<script src="https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js"></script>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/jqgrid/4.6.0/css/ui.jqgrid.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/jqgrid/4.6.0/js/i18n/grid.locale-kr.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jqgrid/4.6.0/js/jquery.jqGrid.min.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.11.4/jquery-ui.min.css">
<button id="ttogrid">그리드로 변환</button>
<br /><br />

<div style="width:500px;">
<table  id="mytable" border="1">
<thead>
<tr>
<th>Header1</th>
<th>Header2</th>
<th>Header3</th>
</tr>
</thead>
<tbody>
<tr>
<td>Cell 11</td>
<td>Cell 12</td>
<td>Cell 13</td>
</tr>
<tr>
<td>Cell 21</td>
<td>Cell 22</td>
<td>Cell 23</td>
</tr>
<tr>
<td>Cell 31</td>
<td>Cell 32</td>
<td>Cell 33</td>
</tr>
</tbody>
</table>
</div>

JavaScript

jQuery("#ttogrid").click(function (){
	tableToGrid("#mytable");
});