码迷,mamicode.com
首页 > Web开发 > 详细

jsTree简单应用Demo

时间:2016-07-06 18:10:08      阅读:305      评论:0      收藏:0      [点我收藏+]

标签:

<!DOCTYPE html>

<html>
<head>
    <meta name="viewport" content="width=device-width" />
    <title></title>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/jstree/3.2.1/themes/default/style.min.css" />
    <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.12.1/jquery.min.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/jstree/3.2.1/jstree.min.js"></script>
</head>
<body>
    <div id="jstree_demo_div" style="font-size:10pt;">
        <!-- in this example the tree is populated from inline HTML -->
        <ul>
            <li>
                Root node 1
                <ul>
                    <li id="child_node_1" data-jstree=‘{"icon":"http://www.jstree.com/tree.png"}‘>Child node 1</li>
                    <li data-jstree=‘{"icon":"http://www.jstree.com/tree.png"}‘>Child node 2</li>
                </ul>
            </li>
            <li>Root node 2</li>
        </ul>
    </div>

   <script>
       $(function () { $(‘#jstree_demo_div‘).jstree(); });

   </script>
</body>
</html>

 源自:https://www.jstree.com/docs/html/

 

jsTree简单应用Demo

标签:

原文地址:http://www.cnblogs.com/xp1056/p/5647463.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!