easyui中tree控件添加自定义图标icon

来源于:http://blog.163.com/lintianhuanhai@126/blog/static/165587366201421704420256/
<!DOCTYPE html>
<html>
  <head>
    <title>easyui中tree控件添加自定义图标icon</title>
 
    <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
    <meta http-equiv="description" content="this is my page">
    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
    <link rel="stylesheet" type="text/css" href="../css/default/easyui.css">
    <link rel="stylesheet" type="text/css" href="../css/demo.css">
    <link rel="stylesheet" type="text/css" href="../css/icon.css">
    <script type="text/javascript" src="../js/jquery.min.js"></script>
    <script type="text/javascript" src="../js/jquery.easyui.min.js"></script>
  </head>
 
  <body>
    <ul class="easyui-tree" data-options="url:'../json/tree_data2.json',method:'get',animate:true"></ul>
  </body>
</html>
</html>
 
 
tree_data2.json:
[{
"id":1,
"text":"My Documents",
"children":[{
"id":11,
"text":"Photos",
"state":"closed",
"children":[{
"id":111,
"text":"Friend"
},{
"id":112,
"text":"Wife"
},{
"id":113,
"text":"Company"
}]
},{
"id":12,
"text":"Program Files",
"state":"closed",
"children":[{
"id":121,
"text":"Intel"
},{
"id":122,
"text":"Java"
},{
"id":123,
"text":"Microsoft Office"
},{
"id":124,
"text":"Games"
}]
},{
"id":16,
"text":"Actions",
"children":[{
"text":"Add",
"iconCls":"icon-add"
},{
"text":"Remove",
"iconCls":"icon-remove"
},{
"text":"Save",
"iconCls":"icon-save"
},{
"text":"Search",
"iconCls":"icon-search"
}]
},{
"id":13,
"text":"index.html"
},{
"id":14,
"text":"about.html"
},{
"id":15,
"text":"welcome.html"
}]
}]
原文地址:https://www.cnblogs.com/ys-wuhan/p/5886012.html