JSFiddle - React, Tailwind, and code Playground
by Diman0o
HTML
<script src="http://lightswitch05.github.io/table-to-json/javascripts/jquery.tabletojson.min.js"></script>
<button id="run" class="btn btn-primary">Convert!</button>
<div id="zlp"></div><table id='example-table' class="table table-striped">
<thead>
<tr>
<th>value</th>
<th>text</th>
</tr>
</thead>
<tbody>
<tr>
<td>+0+1–2</td>
<td>Добивается надежных, упорядоченных связей, которые гарантировали бы длительное удовлетворение потребностей и не допускали бы причинение ущерба</td>
</tr>
</tbody>
</table>
CSS
@import url('http://twitter.github.com/bootstrap/assets/css/bootstrap.css');
JavaScript
$('#run').click( function() {
alert('qq');
clear_input();
});
function clear_input(){
/* $("div").prev() */
var table = $('#example-table').tableToJSON();
alert(JSON.stringify(table));
$('#zlp').html(JSON.stringify(table));
$('#run').remove();
$('#example-table').remove();
}
$(document).ready(function () {
clear_input();
});