<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<link rel="stylesheet" type="text/css" href="easyui/themes/default/easyui.css">
<link rel="stylesheet" type="text/css" href="easyui/themes/icon.css">
<link rel="stylesheet" type="text/css" href="easyui/demo.css">
<!--<link rel="stylesheet" type="text/css" href="css/common.css">-->
<script type="text/javascript" src="easyui/jquery.min.js"></script>
<script type="text/javascript" src="easyui/jquery.easyui.min.js"></script>
<script type="text/javascript">
$(function(){
var treeData=[{
text:"基本信息管理",
state:"open",
iconCls:"icon-menu",
children:[{
text:"商品管理",
iconCls:"icon-goods",
attributes:{
url:"jsp/GoodsManager.jsp"
}
},{
text:"供应商管理",
iconCls:"icon-provider",
attributes:{
url:"jsp/ProviderManager.jsp"
}
},{
text:"员工管理",
iconCls:"icon-employee",
attributes:{
url:"jsp/EmployeeManager.jsp"
}
}]
},{
text:"出入库管理",
state:"open",
iconCls:"icon-pencil",
children:[{
text:"商品入库",
iconCls:"icon-instore",
attributes:{
url:"jsp/InGoods.jsp"
}
},{
text:"商品售出",
iconCls:"icon-outstore",
attributes:{
url:"jsp/OutGoods.jsp"
}
},{
text:"库存查询",
iconCls:"icon-zoom",
attributes:{
url:"jsp/Stock.jsp"
}
}]
},{
text:"查询统计",
state:"open",
iconCls:"icon-chart",
children:[{
text:"流水账查询",
iconCls:"icon-daybook",
attributes:{
url:"jsp/DayBookQuery.jsp"
}
},{
text:"收支统计",
iconCls:"icon-account",
attributes:{
url:"jsp/AccountStatistics.jsp"
}
},{
text:"商品销售统计",
iconCls:"icon-sell",
attributes:{
url:"jsp/SellStatistics.jsp"
}
}]
},{
text:"售后服务",
state:"open",
iconCls:"icon-girl",
children:[{
text:"维修记录",
iconCls:"icon-repair",
attributes:{
url:"jsp/RepairRecords.jsp"
}
}]
}];
//实例化树
$("#tree").tree({
data:treeData,
lines:true,
onClick:function(node){
if(node.attributes){
openTab(node.text,node.attributes.url);
}
}
});

function openTab(text,url){
if($("#tabs").tabs('exists',text)){
$("#tabs").tabs('select',text);
}else{
var content="<iframe frameborder='0' scrolling='auto' style='width:100%;height:100%;' src="+url+"></iframe>";
$("#tabs").tabs('add',{
title:text,
closable:true,
content:content
});
}
}

});

</script>
</head>
<body>
<div class="easyui-layout" style="width:1000px;height:800px;margin:auto">
<div data-options="region:'north'" style="height:50px">

</div>
<div data-options="region:'south',split:true" style="height:50px;">

</div>
<div data-options="region:'east',split:true" title="East" style="width:100px;">

</div>
<div data-options="region:'west',split:true" title="West" style="width:150px;">
<div id="tree"></div>
</div>
<div data-options="region:'center',title:'Main Title'">
<!--<div data-options="region:'center',title:'Main Title',iconCls:'icon-ok'">-->
<div class="easyui-tabs" fit="true" border="false" id="tabs" >

</div>
</div>
</div>

</body>
</html>

easyui添加生成tab和子页面jsp的更多相关文章

  1. easyUI添加修改tab页(toolbar)

    代码: <div id="editdialos" class="easyui-dialog" title="虚机配置修改" data- ...

  2. Jquery EasyUI动态生成Tab

    function addTab(title, url) { if ($('#tt').tabs('exists', title)) { $('#tt').tabs('select', title); ...

  3. js之iframe父、子页面通信

    注意事项 一 . 页面加载顺序:一般先加载完父页面才会去加载子页面,所以:必须要确保在iframe加载完成后再进行操作,如果iframe还未加载完成就开始调用里面的方法或变量,会产生错误.判断ifra ...

  4. 通过easyui tab添加的子页面JS脚本必须放在body才生效

    通过easyui tab添加的子页面JS脚本必须放在body才生效 可通过Chrome查看元素时,head标签是否含有你自己写的JS代码

  5. 关于easyUI 的tabs 在子页面增加显示tabs的一个问题

    在父页面点个链接能动态看到子页面的情况太简单,请看easyUI官网:http://www.jeasyui.com/tutorial/layout/tabs2.php现在说的是在子页面点个按钮也能触发增 ...

  6. 关于easyUI在子页面增加显示tabs的一个问题

    在父页面点个链接能动态看到子页面的情况太简单,请看easyUI官网:http://www.jeasyui.com/tutorial/layout/tabs2.php 现在说的是在子页面点个按钮也能触发 ...

  7. easyui的tab加载页面中的form重复提交

    http://blog.csdn.net/fxz1982/article/details/8987769 Easyui中的tabs组件以href方式加载目标页面,如果目标页面中有dialog或者win ...

  8. 使用yii的layout,加入<?php echo $content; ?>这句话时,它会自动在子页面上面添加一个div包裹

    使用yii的layout,加入<?php echo $content; ?>这句话时,它会自动在子页面上面添加一个div包裹,而且div的id命名为id=content,这个和已有id重复 ...

  9. 高德地图 JS API (jsp + miniui(子页面数据返回父页面并设值) + 单个点标记 + 点标记经纬度 + 回显 + 限制地图显示范围+搜索)

    -*-  父页面js function mapFocus(){ //console.log("-*-"); var longitude = mini.get("jd&qu ...

随机推荐

  1. mysqli,Fatal error

    <?php //mysql数据库类-mysqli版 //2014/6/13 class mysqlidb{ public $dbhost; public $dbuser; public $dbp ...

  2. mysql禁用autocommit,以及遇到的问题

    原文地址:http://blog.51yip.com/mysql/1230.html http://blog.csdn.net/ying_593254979/article/details/12095 ...

  3. Brackets(bestcoder)

    Brakerts 每次询问一个区间都根据最开始的线段树在询问的区间重建一棵线段树 view code#include <iostream> #include <cstdio> ...

  4. php中的curl使用入门教程和常见用法实例

    摘要: [目录] php中的curl使用入门教程和常见用法实例 一.curl的优势 二.curl的简单使用步骤 三.错误处理 四.获取curl请求的具体信息 五.使用curl发送post请求 六.文件 ...

  5. C语言中内存分配那些事儿

    C程序的内存结构 C语言的之所以复杂,首先它的内存模型功不可没.不像某些那样的高级语言只需要在使用对象的时候,用new创建.所有之后的事情,你不需要操心.对于C语言,所有与内存相关的东西,都需要熟悉, ...

  6. 修改TFS客户端的工作区类型

    TFS系统存在两种工作区类型:"​本地"和"服务器".默认情况下,用户使用本地工作区实现代码管理. 但是在用户端代码文件特别多(超过10万个文件)时,由于每次启 ...

  7. Java实现点击一个Jlabel增加一个Jlabel的小功能

    当界面生成以后,自己想做一个点击一个Jlabel增加一个Jlabel,即类似于QQ的添加好友以后可以及时的加进一个好友.自己做了好久,发现不能及时刷新.在网上查了一下,然后自己研究了一小会.发现需要v ...

  8. 清除浮动clear/BFC

    浮动的清除有两种方式: 一.clear clear:both/left/right; 二.创建BFC (1)什么是BFC? BFC,块级格式化上下文,是一个独立的渲染区域,只有Block-level ...

  9. No 'Access-Control-Allow-Origin' header is present on the requested resource.

    今天做一个AJAX案例时,浏览器监控到如下错误: XMLHttpRequest cannot load http://54.169.69.60:8081/process_message. No 'Ac ...

  10. Gvr SDK for Unity 分析(二)

    前言 关于google vr sdk的具体使用,传送门 Gvr SDK for Unity 分析(一) Google Daydream平台已经整合进Google VR SDK 本文环境:Unity5. ...