Home > WeChat Applet > Mini Program Development > Detailed explanation of easyUI Layout implementation of tabs label examples

Detailed explanation of easyUI Layout implementation of tabs label examples

小云云
Release: 2018-01-31 14:11:40
Original
2154 people have browsed it

This article mainly introduces relevant information about the examples of jQuery EasyUI Layout implementing tabs tags. I hope this article can help everyone realize such a function. Friends who need it can refer to it. I hope it can help everyone.

jQuery EasyUI Layout Example of implementing tabs tag

1. Overview:

1. Introduce jquery.js and easyUi related files

2. The effect is as shown:

2. Create the Layout homepage:


<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE HTML >
<html>
<head>
<title>SSHE 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">
<script type="text/javascript" src="jslib/jquery-easyui-1.3.1/jquery-1.8.0.min.js"></script>
<script type="text/javascript" src="jslib/jquery-easyui-1.3.1/jquery.easyui.min.js"></script>
<script type="text/javascript" src="jslib/jquery-easyui-1.3.1/locale/easyui-lang-zh_CN.js"></script>
<link rel="stylesheet" href="jslib/jquery-easyui-1.3.1/themes/default/easyui.css" rel="external nofollow" type="text/css"></link>
<link rel="stylesheet" href="jslib/jquery-easyui-1.3.1/themes/icon.css" rel="external nofollow" type="text/css"></link>
<script type="text/javascript" src="jslib/syUtil.js"></script>
</head>
<body class="easyui-layout">
  <p data-options="region:&#39;north&#39;" style="height: 60px;"></p>
  <p data-options="region:&#39;south&#39;" style="height: 20px;"></p>
  <p data-options="region:&#39;west&#39;" style="width: 200px;">
    <jsp:include page="layout/west.jsp"></jsp:include>
  </p>
  <p data-options="region:&#39;east&#39;,title:&#39;east&#39;,split:true" style="width: 200px;"></p>
  <p data-options="region:&#39;center&#39;,title:&#39;欢迎使用SSHE示例系统&#39;" style="overflow: hidden;">
    <jsp:include page="layout/center.jsp"></jsp:include>
  </p>

  <jsp:include page="user/login.jsp"></jsp:include>

  <jsp:include page="user/reg.jsp"></jsp:include>
</body>
</html>
Copy after login

3. Create an intermediate page:


<%@ page language="java" pageEncoding="UTF-8"%>
<script type="text/javascript">
  function addTab(opts) {
    var t = $(&#39;#layout_center_tabs&#39;);
    if (t.tabs(&#39;exists&#39;, opts.title)) {
      t.tabs(&#39;select&#39;, opts.title);
    } else {
      t.tabs(&#39;add&#39;, opts);
    }
  }
</script>
<p id="layout_center_tabs" class="easyui-tabs" data-options="fit:true,border:false" style="overflow: hidden;">
  <p title="首页"></p>
</p>
Copy after login

4. Menu page: west.jsp


##

<%@ page language="java" pageEncoding="UTF-8"%>
<p class="easyui-panel" data-options="title:&#39;功能导航&#39;,border:false,fit:true">
  <p class="easyui-accordion" data-options="fit:true,border:false">
    <p title="系统菜单" data-options="iconCls:&#39;icon-save&#39;">
      <ul id="layout_west_tree" class="easyui-tree" data-options="
          url : &#39;${pageContext.request.contextPath}/menuAction!getAllTreeNode.action&#39;,
          parentField : &#39;pid&#39;,
          lines : true,
          onClick : function(node) {
            if (node.attributes.url) {
              var url = &#39;${pageContext.request.contextPath}&#39; + node.attributes.url;
              addTab({
                title : node.text,
                closable : true,
                href : url
              });
            }
          }
          "></ul>
    </p>
    <p title="Title2" data-options="iconCls:&#39;icon-reload&#39;"></p>
  </p>
</p>
Copy after login
Related recommendations;


##div+css example of implementing tabs tags Code_html/css_WEB-ITnose

jQuery EasyUI API Chinese Document - Tabs tab page/tab_jquery

javascript dynamically add and delete tabs Tag method_javascript skills

The above is the detailed content of Detailed explanation of easyUI Layout implementation of tabs label examples. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template