No digo muchas tonterías, publicaré el código directamente.
<! maestro /dist/jquery.jsonview.css/> <script type = text/javascript src = http: //code.jqury.com/jqury.min.js> </script> ipt src = https: //rawgithub.com /yesmeck/jquery-jsonview/master/dist/jqury.jsonview.js> </script> <script type = text/javascript> var json = {hey: guy, anumbor: 243, anobject: {whoa: nuts, anArray: [1,2, thr <h1> ee], otheraray: [1, 2], más: cosas}, impresionante: verdadero, falso, falso, significado: nulo, japonés: mañana. , enlace: http://jsonview.com, nolink: http://jsonview.com es genial}; ', Function () {$ (' #json '). $ ('#Toggle-nivel1-btn'). '). Colapso </boton> <button id = expand-btn> expandir </boton> <button id = toggle-btn> toggle </boton> tton id = toggle-nivel1-btn> toggle nivel1 </botte> <button id = Toggle-Level2-BTN> Toggle Level2 </boton> <div id = json> </div> </html>
Como muestra la demostración, el formato JSON
El anterior es el código de instancia del formato HTML introducido por Xiaobian. ¡Muchas gracias por su apoyo al sitio web de VEVB Wulin!