| 
注册时间2014-8-11最后登录1970-1-1阅读权限10积分157精华0帖子36
 
 
 | 
| 用Tree绑定json数据: Tree中代码:
 
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
 <html xmlns="http://www.w3.org/1999/xhtml">
 <head runat="server">
 <title></title>
 <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
 <script src="Scripts/boot.js" type="text/javascript"></script>
 <script type="text/javascript">
 mini.parse();
 $(function () {
 
 
 });
 </script>
 </head>
 <body>
 
 <ul id="tree1" class="mini-tree" url="listtree.txt" style="width:200px;padding:5px;"
 showTreeIcon="true" textField="text" idField="id" parentField="pid" resultAsTree="false"
 showArrow="true" expandOnNodeClick="true"
 >
 </ul>
 </body>
 </html>
 
 
 json数据内容(在listtest.txt文件中):
 
 [
 {"id":"0","text":"批发价格"},
 {"id":"2","text":"93#","pid":"0"},
 {"id":"6","text":"中石油","pid":"2"},
 {"id":"7","text":"中石化","pid":"2"},
 {"id":"8","text":"社会单位","pid":"2"},
 {"id":"3","text":"0#", "pid":"0"},
 {"id":"9","text":"中石油","pid":"3"},
 {"id":"10","text":"中石化","pid":"3"},
 {"id":"11","text":"中海油","pid":"3"}
 
 ]
 
 如果把中文全部改成英文或数字没有问题,但那时中文会出现问题,什么情况?
 | 
 |