先加入 css和js文件
---------------------------------------------------------------------------
<link rel="stylesheet" type="text/css" href="themes/default/easyui.css">
<link rel="stylesheet" type="text/css" href="themes/icon.css"><script type="text/javascript" src="jquery.easyui.min.js"></script>
-----------------------------------------------------------------------
<script type="text/javascript" src="me.js"></script> 下面有详细代码
----------------------------------------------------------------------
</script><!-- JS -->
<!-- 查询窗口 --><table id="dg" title="低保管理" class="easyui-datagrid" style="width:902px;height:374px" toolbar="#toolbar" rownumbers="true" fitColumns="true" singleSelect="true" url="db_/dbgl_.asp?act=list"> <thead> <tr> <th field="id" width="50">编号</th> <th field="xm" width="50">姓名</th> <th field="xb" width="50">性别</th> <th field="sfzh" width="50">身份证号</th> <th field="b1" width="50">审批时间</th> <th field="b2" width="50">低保金额</th> <th field="b3" >申请低保理由</th> <th field="b4" width="50">低保证编号</th> <th field="b5" >享受取暖补贴</th> <th field="b7" >公益性岗位</th> <th field="b7" width="80">两劳释放人员</th> </tr> </thead> </table> <div id="dlg" class="easyui-dialog" style="width:400px;height:320px;padding:10px 20px" closed="true" buttons="#dlg-buttons"> <div class="ftitle">低保信息管理</div> <form id="fm" method="post" novalidate> <div class="fitem"> <label>居民档案:</label> <input name="jid" class="easyui-validatebox" id="jid" required="true" onClick="$('#win3').dialog('open')"> <span ><a href="javascript:void(0)" onClick="$('#win3').dialog('open')">档案查询</a></span> </div> <div class="fitem"> <label>审批时间:</label> <input name="b1" class="easyui-datebox" > </div> <div class="fitem"> <label>低保金额:</label> <input name="b2" class="easyui-validatebox" > </div> <div class="fitem"> <label>申请低保理由:</label> <input name="b3" class="easyui-validatebox" > </div> <div class="fitem"> <label>低保证编号:</label> <input name="b4" class="easyui-validatebox" > </div> <div class="fitem"> <label>享受取暖补贴:</label> <select name="b5" id="b5"> </select> </div> <div class="fitem"> <label>公益性岗位:</label> <select name="b6" id="b6"> </select> </div> <div class="fitem"> <label>两劳释放人员:</label> <select name="b7" id="b7"> </select> </div> </form> <script>var themes5 = [{ "id": "是", "text": "是", "selected": false },{ "id": "否", "text": "否", "selected": false }]$('#b5').combobox({ data: themes5, width: 120, valueField: 'id', textField: 'text', editable: false, panelHeight: 'auto'});$('#b6').combobox({ data: themes5, width: 120, valueField: 'id', textField: 'text', editable: false, panelHeight: 'auto'});$('#b7').combobox({ data: themes5, width: 120, valueField: 'id', textField: 'text', editable: false, panelHeight: 'auto'});</script> </div><div ID="tt" class="easyui-pagination" style="border:1px solid #ccc;width:900px;" data-options="total:69,pageSize: 10, showPageList: false,showRefresh:false,displayMsg: '当前记录 {from} - {to} , 记录总数 {total} 。',onSelectPage: function(pageNumber, pageSize){ReloadData(pageNumber, pageSize);}"> </div> <script language="javascript">function ReloadData(pageNumber, pageSize){ $('#dg').datagrid({ url:'db_/dbgl_.asp?act=list&page='+pageNumber }); }</script><div id="toolbar"> <a href="" class="easyui-linkbutton" iconCls="icon-add" plain="true" onClick="newUser()">新建</a> <a href="" class="easyui-linkbutton" iconCls="icon-edit" plain="true" onClick="editUser()">编辑</a> <a href="" class="easyui-linkbutton" iconCls="icon-cross" plain="true" onClick="removeUser()">删除</a> <a href="" class="easyui-linkbutton" iconCls="icon-remove" plain="true" onClick="chaxun()">查询</a> <a href="" class="easyui-linkbutton" iconCls="icon-remove" plain="true" onClick="jmxx()">查看详细</a> <a href="" class="easyui-linkbutton" iconCls="icon-remove" plain="true" onClick="jtxx()">查看家庭</a> </div> <div id="win3" class="easyui-window" title="档案查询" closed="true" maximizable="false" minimizable="false" collapsible="false" style="width:800px;height:300px;padding:5px;"> ...</div><script language="javascript">$("#win3").load("jm.asp");</script><div id="dlg-buttons"> <a href="" class="easyui-linkbutton" iconCls="icon-ok" onClick="saveUser()">保存</a> <a href="" class="easyui-linkbutton" iconCls="icon-cancel" onClick="javascript:$('#dlg').dialog('close')">取消</a></div>
me.js
--------------------------------------------------------------------------
function addTab(title, url){
var tabCount = $('#tabs').tabs('tabs').length;
var hasTab = $('#tabs').tabs('exists', title);
var opentabs1 = 5;
if (tabCount > opentabs1 && !hasTab) {
var msg = '<b>您当前打开了太多的页面,如果继续打开,会造成程序运行缓慢,无法流畅操作!</b>'
$.messager.confirm("系统提示", msg, function (b) {
if (b) add();
else return false;
})
} else {
add();
}
if ($('#tabs').tabs('exists', title)){
$('#tabs').tabs('select', title);
} else {
var content = '<iframe scrolling="auto" frameborder="0" src="'+url+'" style="width:100%;height:100%;"></iframe>';
$('#tabs').tabs('add',{
title:title,
content:content,
closable:true
});
}
}