三默网为您带来有关“ExtJs之 Ext.JSON”的文章内容,供您阅读参考。
ExtJs之 Ext.JSON
2022-09-18 22:51:02
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
<! 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 >
|