- 注册时间
- 2014-7-21
- 最后登录
- 2022-7-26
- 阅读权限
- 150
- 积分
- 18264
- 精华
- 0
- 帖子
- 8338
 
|
- <!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>
- <title></title>
- <script src="../../scripts/boot.js" type="text/javascript"></script>
- </head>
- <body>
- <button onclick="addTab()">addTab</button>
- <div id="tabs1" class="mini-tabs" style="width:400px;height:300px">
-
- </div>
- </body>
- </html>
- <script type="text/javascript">
- var list = [
- { id: "base", text: "Base" },
- { id: "ajax", text: "Ajax", pid: "base" },
- { id: "json", text: "JSON", pid: "base" },
- { id: "date", text: "Date", pid: "base" },
- { id: "control", text: "Control", pid: "base" },
- { id: "forms", text: "Forms", pid: "base" },
- { id: "button", text: "Button", pid: "forms" },
- { id: "listbox", text: "ListBox", pid: "forms" },
- { id: "checkboxlist", text: "CheckBoxList", pid: "forms" },
- { id: "lists", text: "Lists" },
- { id: "datagrid", text: "DataGrid", pid: "lists" },
- { id: "tree", text: "Tree", pid: "lists" },
- { id: "treegrid", text: "TreeGrid ", pid: "lists" }
- ];
- mini.parse()
- function addTab() {
- var tabs1 = mini.get("tabs1");
- var tab = { title: "tab1" }
- tabs1.addTab(tab);
- tabs1.activeTab(tab);
- var el = tabs1.getTabBodyEl(tab);
- el.innerHTML = '<div id="leftTree1" class="mini-outlooktree" ></div>';
- mini.parse();
- var tree = mini.get("leftTree1")
- tree.loadList(list, "id", "pid");
- }
- </script>
复制代码 按你的代码可以生成 |
|