使

 

 

用开源插件Table-to-json:

官方地址:http://lightswitch05.github.io/table-to-json/

功能说明:将js对象table转换成javascript对象,输出json数据字符串。

jquery插件-table转Json数据插件

 1.引用

<script type="text/javascript" src="
http://code.jquery.com/jquery-latest.js"></script
>
 <script type="text/javascript" src="../src/jquery.tabletojson.js"></script>

 

2.插入

<script>
$('#convert-table').click( function() {
  var table = $('#example-table').tableToJSON(); // Convert the table into a javascript object
  console.log(table);
  alert(JSON.stringify(table));
});
</script>

 

相关文章:

  • 2021-08-20
  • 2021-10-01
  • 2022-12-23
  • 2021-09-20
  • 2022-01-28
  • 2021-06-19
猜你喜欢
  • 2022-12-23
  • 2021-06-02
  • 2022-12-23
  • 2021-07-07
  • 2022-02-19
  • 2021-07-28
相关资源
相似解决方案