<link rel="stylesheet" href="../js/easyui/themes/default/easyui.css">
<link rel="stylesheet" href="../js/easyui/themes/icon.css">
<script type="text/Javascript" src="../js/jquery-2.2.3.min.js">script>
<script type="text/Javascript" src="../js/easyui/jquery.easyui.min.js">script>
<p>This sample shows how to create a complex layout.p>
<div style="margin: 20px 0;">div>
<div class="easyui-layout" id="LayoutTest"
style="width: auto; height: 350px;">
<div data-options="region:‘east‘,split:true" title="East"
style="width: 180px;">
<ul class="easyui-tree"
data-options="url:‘tree_data1.json‘,method:‘get‘,animate:true,dnd:true">ul>
div>
<div data-options="region:‘west‘,split:true" title="West"
style="width: 100px;">
<div class="easyui-accordion" data-options="fit:true,border:false">
<div title="TreeMenu" style="padding: 10px;">
<ul class="easyui-tree">
<li><span>Foodsspan>
<ul>
<li><span>Fruitsspan>
<ul>
<li>appleli>
<li>orangeli>
ul>li>
<li><span>Vegetablesspan>
<ul>
<li>tomatoli>
<li>carrotli>
<li>cabbageli>
<li>potatoli>
<li>lettuceli>
ul>li>
ul>li>
ul>
div>
<div title="Title2" data-options="selected:true"
style="padding: 10px;">
<div style="margin-bottom: 10px; text-align: center;">
<a href="Javascript:void(0);"
onclick="addTab(‘google‘,‘http://www.baidu.com‘)">baidua><br>
<a href="Javascript:void(0);"
onclick="addTab(‘jquery‘,‘http://jquery.com/‘)">jquerya>
<a href="Javascript:void(0);"
onclick="addTab(‘easyui‘,‘http://jeasyui.com/‘)">easyuia>
<a href="Javascript:void(0);"
onclick="addTab(‘myjsp‘,‘/test/myjsp.do‘)">myjspa>
div>
div>
<div title="Title3" style="padding: 10px">content3div>
div>
div>
<div
data-options="region:‘center‘,title:‘Main Title‘,iconCls:‘icon-ok‘">
<div class="easyui-tabs" data-options="fit:true,border:false,plain:true" id="tt">
<div title="About" data-options="href:‘_content.html‘"
style="padding: 10px">div>
<div title="DataGrid" style="padding: 5px">
<table class="easyui-datagrid"
data-options="url:‘datagrid_data1.json‘,method:‘get‘,singleSelect:true,fit:true,fitColumns:true">
<thead>
<tr>
<th data-options="field:‘itemid‘" width="80">Item IDth>
<th data-options="field:‘productid‘" width="100">Product IDth>
<th data-options="field:‘listprice‘,align:‘right‘" width="80">List
Priceth>
<th data-options="field:‘unitcost‘,align:‘right‘" width="80">Unit
Costth>
<th data-options="field:‘attr1‘" width="150">Attributeth>
<th data-options="field:‘status‘,align:‘center‘" width="50">Statusth>
tr>
thead>
table>
div>
div>
div>
div>
<script>
function addTab(title, url) {
if ($(‘#tt‘).tabs(‘exists‘, title)) {
$(‘#tt‘).tabs(‘select‘, title);
} else {
var content = ‘‘;
$(‘#tt‘).tabs(‘add‘, {
title : title,
content : content,
closable : true
});
}
}
script>