ExtJs之 Ext.JSON
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了ExtJs之 Ext.JSON相关的知识,希望对你有一定的参考价值。
<!DOCTYPE html> <html> <head> <title>ExtJs</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <link rel="stylesheet" type="text/css" href="ExtJs/packages/ext-theme-crisp/build/resources/ext-theme-crisp-all.css"> <script type="text/javascript" src="ExtJs/ext-all.js"></script> <script type="text/javascript" src="ExtJs/bootstrap.js"></script> <script type="text/javascript" src="ExtJs/packages/ext-theme-crisp/build/ext-theme-crisp.js"></script> </head> <body> <script type="text/javascript"> Ext.onReady(function() { var jsonStr = "{name: ‘the json name‘, value: ‘the json value‘}"; var obj = Ext.JSON.decode(jsonStr, true); var g = ‘g‘, h = ‘h‘, e = [g, h], f = ‘f‘, b = [e, f], a = [b, ‘c‘]; var endA = Ext.JSON.encode(a); Ext.Msg.alert("notice", endA, obj); }); </script> </body> </html>
以上是关于ExtJs之 Ext.JSON的主要内容,如果未能解决你的问题,请参考以下文章