当前位置:编程学习 > JS >>

Extjs应用tab页的最简单Demo

<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
   
    <title>Extjs应用tab页的最简单Demo</title>
   
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">   
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">

<link rel="stylesheet" type="text/css" href="extjs/resources/css/ext-all.css" />
<script type="text/javascript" src="extjs/adapter/ext/ext-base.js"></script>
<script type="text/javascript" src="extjs/ext-all.js"></script>


<script type="text/javascript" src="vehiclemanage/util/util.js"></script>
<script type="text/javascript" src="vehiclemanage/js/Vvehicle.js"></script>
<script type="text/javascript" src="js/jquery132min.js"></script>


<script type="text/javascript">
Ext.onReady(function(){
///////////panel开始,用于显示控制信息
var contentPanel = new Ext.TabPanel({
    region:'center',
    enableTabScroll:true,
  activeTab:0,
  items:[{
     id:'homePage',
     title:'首页',
     autoScroll:true,
     html:'<div style="position:absolute;color:#ff0000;top:40%;left:40%;">欢迎来到阿柒人事管理系统</div>'
  },{
     id:'111',
     title:'首页2',
     autoScroll:true,
     html:'<div style="position:absolute;color:#ff0000;top:40%;left:40%;">333333</div>'
  },]
});

contentPanel.add(
    {
        'id':"aa",
        'title':"Tab1",
        closable:true,  //通过html载入目标页 www.zzzyk.com
        html:'<iframe scrolling="auto" frameborder="0" width="100%" height="100%" src="usermanage/testA.jsp"></iframe>'
    },{
    'id':"bb",
        'title':"Tab2",
        closable:true,  //通过html载入目标页
        html:'<iframe scrolling="auto" frameborder="0" width="100%" height="100%" src="usermanage/testB.jsp"></iframe>'
    }
    );


var viewport = new Ext.Viewport({
        layout:'border',
        items:[
        {
            region: 'center',
            split: true,
            border: true,
            layout: 'border',
            items: [contentPanel]
        }]
    });
});
</script>


  </head>
 
  <body>
  </body>
</html>


摘自 漂泊小柒的专栏
补充:综合编程 , 其他综合 ,
CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,