jquery easyui layout 怎样添加和删除面板

<div id="gpyDiv" class="easyui-layout" fit=true style="width:100%;height:100%;"> <div data-options="region:'south',title:'South Title',split:true" style="height:100px;"></div> <div data-options="region:'east',iconCls:'icon-reload',title:'East',split:true" style="width:100px;"></div> <div data-options="region:'west',title:'West',split:true" style="width:100px;"></div> <div data-options="region:'center',title:'center title'" style="padding:5px;background:#eee;"></div> </div>

<a href="javascript:void(0)" class="easyui-linkbutton" value="Scan" id="BtnScan" data-options="iconCls:'icon-print'" onclick="javascript:addPanel()" >添加面板</a> <a href="javascript:void(0)" class="easyui-linkbutton" value="Scan" id="BtnScan" data-options="iconCls:'icon-print'" onclick="javascript:deletePanel()" >删除面板</a>

/*添加div*/ function addPanel(){ $("#gpyDiv").layout('add',{ region: 'south', width: '100%', height:200 }); } /*删除div*/ function deletePanel(){ $("#gpyDiv").layout('remove','south'); }

一个简单的示例 希望能帮到您!

你可能感兴趣的:(jquery easyui)