全国咨询热线:18720358503

[科技]基于jquery的json转table插件jsontotable

类别:企业动态 发布时间:2021-01-11 浏览人次:

[科技]基于jquery的json转table插件jsontotable  :04  浏览数:
/div script type="text/javascript" src="Scripts/jquery/jquery.min.js" /script script type="text/javascript" src="js/jquery.jsontotable.min.js" /script script type="text/javascript" $(document).ready(function () { var arr = [ [1, 2, 3], ['one', 'two', 'three'] var input = JSON.stringify(arr); $("#jsontotable-arr") .("Array To Table")) .("Input")) .(input)) .("Output")); $.jsontotable(arr, { id: "#jsontotable-arr", header: true }); $("#jsontotable-arr") .("Array To Table (Without Header)")) .("Input")) .(input)) .("Output")); $.jsontotable(arr, { id: "#jsontotable-arr", header: false }); var obj = [ { "Title1": "Hello", "Title2": "Fine", "Title3": "Thank you" }, { "Title1": "안녕하세요", "Title2": "좋아요", "Title3": "감사합니다" }, { "Title1": "こんにちは", "Title2": "ファイン", "Title3": "ありがとう" }, { "Title1": "你好", "Title2": "精", "Title3": "谢谢" }, { "Title1": "Bonjour", "Title2": "Beaux", "Title3": "Merci" }, { "Title1": "Ciao", "Title2": "Bene", "Title3": "Grazie" } input = JSON.stringify(obj); $("#jsontotable-obj") .("JSON To Table (Has Header)")) .("Input")) .(input)) .("Output")); $.jsontotable(obj, { id: "#jsontotable-obj" }); $("#jsontotable-obj") .("JSON To Table (Without Header)")) .("Input")) .(input)) .("Output")); $.jsontotable(obj, { id: "#jsontotable-obj", header: false }); var objwithdata = [ { id: 'header', class: 'header-class', _data: ['Hello', 'Fine', 'Thank you'] }, { "Title1": "안녕하세요", "Title2": "좋아요", "Title3": "감사합니다" }, { "Title1": "こんにちは", "Title2": "ファイン", "Title3": "ありがとう" }, { "Title1": "你好", "Title2": "精", "Title3": "谢谢" }, { "Title1": "Bonjour", "Title2": "Beaux", "Title3": "Merci" }, { "Title1": "Ciao", "Title2": "Bene", "Title3": "Grazie" } input = JSON.stringify(objwithdata); $("#jsontotable-objwithdata") .("JSON To Table with _data attribute (Has Header)")) .("Input")) .(input)) .("Output")); $.jsontotable(objwithdata, { id: "#jsontotable-objwithdata" }); $("#jsontotable-objwithdata") .("JSON To Table with _data attribute (Without Header)")) .("Input")) .(input)) .("Output")); $.jsontotable(objwithdata, { id: "#jsontotable-objwithdata", header: false }); var str = '[\ {"Title1": "Hello", "Title2": "Fine", "Title3": "Thank you"}, \ {"Title1": "안녕하세요", "Title2": "좋아요", "Title3": "감사합니다"}, \ {"Title1": "こんにちは", "Title2": "ファイン", "Title3": "ありがとう"}, \ {"Title1": "你好", "Title2": "精", "Title3": "谢谢"}, \ {"Title1": "Bonjour", "Title2": "Beaux", "Title3": "Merci"}, \ {"Title1": "Ciao", "Title2": "Bene", "Title3": "Grazie"} \ $("#jsontotable-str") .("JSON (String Format) To Table")) .("Input")) .(input)) .("Output")); $.jsontotable(str, { id: "#jsontotable-str", className: "table table-hover" /script
下一篇:没有了

推荐阅读

[科技]基于jquery的json转table插件jsontotable

[高新科技]根据jquery的json转table软件jsontotable :04 访问数:/div script type="text/javascript" src="Scripts/jquery/jquery.min.js" /script script type="text/javas...

2021-01-11
用户体验自检清单

当设计方案进行的情况下,你一定非常期待马上就寻找一些客户来参加客户感受检测,但是别心急,你可以以看一下下边的这种能用性关键点不是是早已经被遵循了。大家坚信这会节省...

2021-01-11
广州凡科互联网科技股份有限公司招聘阿里巴巴

招聘人数:5职位信息岗位职责:1、负责公司阿里巴巴国际站B2B平台店铺的整体运营;2、多途径梳理挖掘产品关键词,发布产品覆盖买家搜索习惯,提升阿里巴巴店铺的曝光率和询盘量...

2021-01-11
微信小程序定制设计_webpack与SPA实践之管理CSS等资

webpack与SPA实践活动之管理方法CSS等資源的方式 详细介绍了怎样应用webpack构建一个平稳的适用当地服务、全自动更新、控制模块热更换、应用ES6撰写JavaScript的开发设计自然环境,...

2021-01-11
(干货)网站设计在网络营销中的作用

(干货知识)网站制作在互联网营销推广中的功效 :00 访问数:当今的时期化学物质日常生活十分富裕,大家大量的追求完美精神实质上的要求,电子器件商务接待的迅速发展趋势也考...

2021-01-11
微信小程序如何开发_JS改变页面颜色源码分享

JS更改网页页面色调源代码共享 大家先看来下实际的演试实际效果图下列便是详细的HTML网页页面编码,大伙儿能够检测下。!DOCTYPE html html lang="en" head meta charset="UTF-8" title Document ...

2021-01-11
X

400-8700-61718720358503
企业邮箱2639601583@qq.com
官方微信