easyui添加生成tab和子页面jsp
<!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的更多相关文章
- easyUI添加修改tab页(toolbar)
代码: <div id="editdialos" class="easyui-dialog" title="虚机配置修改" data- ...
- Jquery EasyUI动态生成Tab
function addTab(title, url) { if ($('#tt').tabs('exists', title)) { $('#tt').tabs('select', title); ...
- js之iframe父、子页面通信
注意事项 一 . 页面加载顺序:一般先加载完父页面才会去加载子页面,所以:必须要确保在iframe加载完成后再进行操作,如果iframe还未加载完成就开始调用里面的方法或变量,会产生错误.判断ifra ...
- 通过easyui tab添加的子页面JS脚本必须放在body才生效
通过easyui tab添加的子页面JS脚本必须放在body才生效 可通过Chrome查看元素时,head标签是否含有你自己写的JS代码
- 关于easyUI 的tabs 在子页面增加显示tabs的一个问题
在父页面点个链接能动态看到子页面的情况太简单,请看easyUI官网:http://www.jeasyui.com/tutorial/layout/tabs2.php现在说的是在子页面点个按钮也能触发增 ...
- 关于easyUI在子页面增加显示tabs的一个问题
在父页面点个链接能动态看到子页面的情况太简单,请看easyUI官网:http://www.jeasyui.com/tutorial/layout/tabs2.php 现在说的是在子页面点个按钮也能触发 ...
- easyui的tab加载页面中的form重复提交
http://blog.csdn.net/fxz1982/article/details/8987769 Easyui中的tabs组件以href方式加载目标页面,如果目标页面中有dialog或者win ...
- 使用yii的layout,加入<?php echo $content; ?>这句话时,它会自动在子页面上面添加一个div包裹
使用yii的layout,加入<?php echo $content; ?>这句话时,它会自动在子页面上面添加一个div包裹,而且div的id命名为id=content,这个和已有id重复 ...
- 高德地图 JS API (jsp + miniui(子页面数据返回父页面并设值) + 单个点标记 + 点标记经纬度 + 回显 + 限制地图显示范围+搜索)
-*- 父页面js function mapFocus(){ //console.log("-*-"); var longitude = mini.get("jd&qu ...
随机推荐
- RAID详解[RAID0/RAID1/RAID10/RAID5]
一.RAID定义RAID(Redundant Array of Independent Disk 独立冗余磁盘阵列)技术是加州大学伯克利分校1987年提出,最初是为了组合小的廉价磁盘来代替大的昂贵磁盘 ...
- C++变量和函数
变量可根据作用域和类型分为 (动态)全局变量,静态全局变量,(动态)局部变量,静态局部变量 全局变量:定义在函数外,在源程序其他cpp文件中访问需要extern修饰 静态局部变量:生命周期相比局部变量 ...
- linux线程同步(4)-自旋锁
自旋锁与互斥量功能一样,唯一一点不同的就是互斥量阻塞后休眠让出cpu,而自旋锁阻塞后不会让出cpu,会一直忙等待,直到得到锁!!! 自旋锁在用户态使用的比较少,在内核使用的比较多!自旋锁的使用场景:锁 ...
- C# 中 SQLite 使用介绍
关于SQLite SQLite是一款轻型的嵌入式的遵守ACID的关系型数据库管理系统,诞生已有15个年头了.随着移动互联的发展,现在得到了更广泛的使用. 在使用SQLite之前,我们势必要先了解它一些 ...
- c++ learning note
1/ int 转换成 string 格式 #include<sstream> std::stringstream ss; str::string temp; int n; ss<& ...
- Codeforces 549B. Looksery Party[构造]
B. Looksery Party time limit per test 1 second memory limit per test 256 megabytes input standard in ...
- [No000066]python各种类型转换-int,str,char,float,ord,hex,oct等
int(x [,base ]) #将x转换为一个整数 long(x [,base ]) #将x转换为一个长整数 float(x ) #将x转换到一个浮点数 complex(real [,imag ]) ...
- java 28 - 1 设计模式 之 面向对象思想设计原则和模版设计模式概述
在之前的java 23 中,了解过设计模式的单例模式和工厂模式.在这里,介绍下设计模式 面向对象思想设计原则 在实际的开发中,我们要想更深入的了解面向对象思想,就必须熟悉前人总结过的面向对象的思想的设 ...
- vijos1334 NASA的食物计划(二维费用的背包问题)
背景 NASA(美国航空航天局)因为航天飞机的隔热瓦等其他安 全技术问题一直大伤脑筋,因此在各方压力下终止了航天 飞机的历史,但是此类事情会不会在以后发生,谁也无法 保证,在遇到这类航天问题时,解决方 ...
- Java 8特性探究(1):通往lambda之路与 lambda表达式10个示例
本文由 ImportNew 函数式接口 函数式接口(functional interface 也叫功能性接口,其实是同一个东西).简单来说,函数式接口是只包含一个方法的接口.比如Java标准库中的ja ...