头部需要引人文件:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>demo</title>
<link rel="stylesheet" type="text/css" href="js/jquery-easyui/themes/default/easyui.css">
<!--<link rel="stylesheet" type="text/css" href="js/jquery-easyui/themes/black/easyui.css">-->
<link rel="stylesheet" type="text/css" href="js/jquery-easyui/themes/icon.css">
<script src="js/jquery.min.js"></script>
<script type="text/javascript" src="js/jquery-easyui/jquery.easyui.min.js"></script>
</head>
<body>
1、首先是面板工具:
<h2>Basic Panel</h2>
<p>The panel is a container for other components or elements.</p>
<div style="margin:20px 0 10px 0;">
<!--easyUI的四个面板工具:打开、关闭、展开、折叠-->
<a href="#" class="easyui-linkbutton" onclick="javascript:$('#p').panel('open')">Open</a>
<a href="#" class="easyui-linkbutton" onclick="javascript:$('#p').panel('close')">Close</a>
<a href="javascript:void(0)" class="easyui-linkbutton" onclick="javascript:$('#p').panel('collapse',true)">Collapse</a>
<a href="javascript:void(0)" class="easyui-linkbutton" onclick="javascript:$('#p').panel('expand',true)">Expand</a>
</div>
<div id="p" class="easyui-panel" title="Basic Panel" style="700px;height:200px;padding:10px;">
<p style="font-size:14px">jQuery EasyUI框架可以帮助您轻松构建web页面。</p>
<ul>
<li>easyui是一个基于jQuery的用户界面插件的集合。</li>
<li>easyui provides essential functionality for building modem, interactive, javascript applications.</li>
<li>using easyui you don't need to write many javascript code, you usually defines user-interface by writing
some HTML markup.
</li>
<li>complete framework for HTML5 web page.</li>
<li>easyui save your time and scales while developing your products.</li>
<li>easyui is very easy but powerful.</li>
</ul>
</div>
2、其次是用户界面工具:增删改查
<h2>用户界面工具,增删查改</h2>
<div class="easyui-panel" title="Custom Panel Tools" style="700px;height:200px;padding:10px;"
data-options="iconCls:'icon-save',closable:true,tools:'#operation'">
<p style="font-size:14px">jQuery EasyUI框架可以帮助您轻松构建web页面。</p>
<ul>
<li>easyui是一个基于jQuery的用户界面插件的集合。</li>
<li>easyui provides essential functionality for building modem, interactive, javascript applications.</li>
<li>using easyui you don't need to write many javascript code, you usually defines user-interface by writing
some HTML markup.
</li>
<li>complete framework for HTML5 web page.</li>
<li>easyui save your time and scales while developing your products.</li>
<li>easyui is very easy but powerful.</li>
</ul>
</div>
<div id="operation">
<a href="javascript:void(0)" class="icon-add" onclick="javascript:alert('add')"></a>
<a href="javascript:void(0)" class="icon-edit" onclick="javascript:alert('edit')"></a>
<a href="javascript:void(0)" class="icon-cut" onclick="javascript:alert('cut')"></a>
<a href="javascript:void(0)" class="icon-help" onclick="javascript:alert('help')"></a>
</div>
3、接着是载入面板内容工具
<h2>载入面板内容</h2>
<p>单击面板右上角的refresh按钮以加载内容。注意是一个文件名,文件名有无下划线都可以</p>
<div style="margin:20px 0 10px 0;"></div>
<div id="load" class="easyui-panel" title="加载面板内容" style="700px;height:200px;padding:10px;"
data-options="
tools:[{
iconCls:'icon-reload',
handler:function(){
<!--$('#load').panel('refresh', '_content.html');-->
$('#load').panel('refresh', 'content.html');
}
}]
">
</div>
content.html:这里要加载的内容是个html文件。文件名可以有下划线,该文件同处根目录下,与“demo”同处一个根目录下即可
</body>
</html>