bootstrap树形下拉框

时间:2021-06-14 12:39:55
【文件属性】:
文件名称:bootstrap树形下拉框
文件大小:129KB
文件格式:ZIP
更新时间:2021-06-14 12:39:55
bootstrap <html> <head> <title>Bootstrap Tree View</title> <link href="css/bootstrap.min.css" rel="stylesheet"> <link href="css/bootstrap-treeview.css" rel="stylesheet"> </head> <body>

Bootstrap Tree View - DOM Tree


所属部门 <input type="text" id="depName" name="depName" class="form-control" value="" > <input type="hidden" id="deptId" name="deptId" value="36">
[removed][removed] [removed][removed] [removed] function buildDomTree() { var data = []; function walk(nodes, data) { if (!nodes) { return; } $.each(nodes, function (id, node) { var obj = { id: id, text: node.nodeName + " T_T " + (node.innerText ? node.innerText : ''), tags: [node.childElementCount > 0 ? node.childElementCount + ' child elements' : ''] }; if (node.childElementCount > 0) { obj.nodes = []; walk(node.children, obj.nodes); } data.push(obj); }); } walk($('html')[0].children, data); return data; } $(function() { var options = { bootstrap2: false, showTags: true, levels: 5, showCheckbox:true, checkedIcon:"glyphicon glyphicon-check", data: buildDomTree(), onNodeSelected:function(event, data){ $("#depName").val(data.text); $("#treeview").hide(); } }; $('#treeview').treeview(options); }); [removed] </body>
【文件预览】:
bootstrap树形下拉框
----css()
--------bootstrap.min.css(120KB)
--------createuser.css(2KB)
--------default.css(6KB)
--------bootstrap-treeview.css(1KB)
--------normalize.css(2KB)
----img()
--------2.jpg(39KB)
--------1.jpg(22KB)
----fonts()
--------icomoon.woff(5KB)
--------icomoon.svg(10KB)
--------icomoon.eot(5KB)
--------icomoon.ttf(5KB)
----index.html(2KB)
----js()
--------jquery-1.9.1.min.js(90KB)
--------bootstrap-treeview.js(11KB)
----dist()
--------bootstrap-treeview.min.js(6KB)
--------bootstrap-treeview.min.css(207B)
----src()
--------css()
--------js()

网友评论